[Mono-bugs] [Bug 33451][Maj] New - Passing array member as parameter fails
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
7 Nov 2002 19:24:59 -0000
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by jason@379.com.
http://bugzilla.ximian.com/show_bug.cgi?id=33451
--- shadow/33451 Thu Nov 7 14:24:59 2002
+++ shadow/33451.tmp.3293 Thu Nov 7 14:24:59 2002
@@ -0,0 +1,57 @@
+Bug#: 33451
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details: RH8
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: jason@379.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Passing array member as parameter fails
+
+The attached program should display
+
+ [0] = This is string 0
+ [1] = This is string 1
+ [2] = This is string 2
+ [3] = This is string 3
+
+and instead displays
+
+ [0] = This is string 0
+ [1] =
+ [2] =
+ [3] = This is string 1
+
+The program still displays the bad output when compiled with csc on
+windows and copied to the linux system and run on mono.
+
+Code follows:
+
+using System;
+
+class ArrayBug
+{
+ static void Main()
+ {
+ string[] strings = new string[4];
+
+ for (int i = 0; i < 4; ++i)
+ {
+ GetString(out strings[i], i);
+ Console.WriteLine("[{0}] = {1}", i, strings[i]);
+ }
+ }
+
+ static void GetString(out string s, int i)
+ {
+ s = String.Format("This is string {0}", i);
+ }
+}