diff options
author | Miguel de Icaza <miguel@gnome.org> | 2004-04-11 08:47:55 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2004-04-11 08:47:55 +0400 |
commit | ad36a219633fad9b9bb1af27865526e50e165251 (patch) | |
tree | efa8c69812454b905ba3fbb09530c79a21217ad6 /mcs/errors/cs0197.cs | |
parent | e494f54426654d911ad7fc53f8b6c4c4cd96357c (diff) |
Fix
svn path=/trunk/mcs/; revision=25330
Diffstat (limited to 'mcs/errors/cs0197.cs')
-rw-r--r-- | mcs/errors/cs0197.cs | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/mcs/errors/cs0197.cs b/mcs/errors/cs0197.cs index b80c580f26d..fe0fec2f421 100644 --- a/mcs/errors/cs0197.cs +++ b/mcs/errors/cs0197.cs @@ -1,26 +1,23 @@ -// cs0197.cs: You cant pass by ref or out a member or field of a MarshalByRefObjectClass. -// Line: 14 +//cs0197.cs: Can not pass fields of a MarshalByRefObject by ref or out +// Line: 15 +using System; +class T : MarshalByRefObject { + int bar; -namespace cs0197 -{ - public class A: MarshalByRefObject + static void Foo (ref int i) { - public string s; } - - public class B + + static void Main() { - public class ConCat (ref string s) - { - s += ' Error'; - } - - static void Main() - { - A Foo = new A (); - Foo.s = 'cs0197'; - this.ConCat (ref Foo.s); - Console.WriteLine (Foo.s); - } + T t = new T (); + t.bar = 12; + Foo (ref t.bar); } } + + + + + + |