Merge pull request #1821 from iainx/replace-getline
[mono-project.git] / mcs / errors / cs0197.cs
blobe1e372696f61516167afa27903659705ccf17654
1 // CS0197: Passing `T.bar' as ref or out or taking its address may cause a runtime exception because it is a field of a marshal-by-reference class
2 // Line: 15
3 // Compiler options: -warnaserror -warn:1
5 using System;
6 class T : MarshalByRefObject {
7 int bar;
9 static void Foo (ref int i)
13 static void Main()
15 T t = new T ();
16 t.bar = 12;
17 Foo (ref t.bar);