Here's the code:

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);
        }
}


Under .NET/csc, this displays:

   [0] = This is string 0
   [1] = This is string 1
   [2] = This is string 2
   [3] = This is string 3

Under Mono/mcs, this displays:

   [0] = This is string 0
   [1] =
   [2] = 
   [3] = This is string 1

I have started investigating it, but I suspect someone here might know
exactly where the problem lies.

Jason
379



_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to