diff options
author | Alejandro Sánchez Acosta <asanchez@mono-cvs.ximian.com> | 2002-12-24 17:10:16 +0300 |
---|---|---|
committer | Alejandro Sánchez Acosta <asanchez@mono-cvs.ximian.com> | 2002-12-24 17:10:16 +0300 |
commit | 451e834b2bf721a06dec48a12ac993f723a416e8 (patch) | |
tree | c0f23893546839a146bcb63795b6d9fc80598485 /mcs/errors/cs0197.cs | |
parent | f91d740dc1cb274e95b63669f947e118f1e28de6 (diff) |
Added cs0197 test error.
svn path=/trunk/mcs/; revision=9859
Diffstat (limited to 'mcs/errors/cs0197.cs')
-rw-r--r-- | mcs/errors/cs0197.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mcs/errors/cs0197.cs b/mcs/errors/cs0197.cs new file mode 100644 index 00000000000..b80c580f26d --- /dev/null +++ b/mcs/errors/cs0197.cs @@ -0,0 +1,26 @@ +// cs0197.cs: You cant pass by ref or out a member or field of a MarshalByRefObjectClass. +// Line: 14 + +namespace cs0197 +{ + public class A: MarshalByRefObject + { + public string s; + } + + public class B + { + 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); + } + } +} |