Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2004-04-11 08:47:55 +0400
committerMiguel de Icaza <miguel@gnome.org>2004-04-11 08:47:55 +0400
commitad36a219633fad9b9bb1af27865526e50e165251 (patch)
treeefa8c69812454b905ba3fbb09530c79a21217ad6 /mcs/errors/cs0197.cs
parente494f54426654d911ad7fc53f8b6c4c4cd96357c (diff)
Fix
svn path=/trunk/mcs/; revision=25330
Diffstat (limited to 'mcs/errors/cs0197.cs')
-rw-r--r--mcs/errors/cs0197.cs37
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);
}
}
+
+
+
+
+
+