[Mono-list] String.Join NullReferenceException

Eduardo Osorio Armenta e_osorio@yahoo.com
Thu, 9 Oct 2003 17:46:17 -0700 (PDT)


OK net 1.1

E:\eduardo\prog\mono\c#\test>csc test.cs
Versión del compilador de Microsoft (R) Visual C#
.NET7.10.3052.4
para Microsoft (R) .NET Framework versión 1.1.4322
(C) Microsoft Microsoft Corporation 2001-2002.
Reservados todos los derechos.

E:\eduardo\prog\mono\c#\test>test
hello world!

--- Rodolfo Campero <rodolfocampero@hotmail.com>
wrote:
> Hi,
> I've found something that maybe is a bug. When I run
> the following program:
> 
> using System;
> namespace Test {
> 	public class TestJoin {
> 		public static void Main(string[] args) {
> 			string[] array = new string[] {"hello ", null,
> "world!"};
> 			Console.WriteLine(String.Join(String.Empty,
> array));
> 		}
> 	}
> }
> 
> I get the following error:
> 
> Unhandled Exception: System.NullReferenceException:
> A null value was found 
> where an object instance was required
> 
> I've tested the same program at work, with
> Microsoft's SDK (1.0), and it 
> prints
> the well-known "hello world!" message.
> 
> Is this a bug? can someone corroborate it under mono
> and under .NET 1.1? If
> that's the case, I'll be happy to write a test case
> (please indicate me 
> where)
> and fill a form in bugzilla.
> 
> I tried to follow the implementation in String.cs,
> but the actual 
> implementation
> is somewhere else; so I guess the fix may require
> more knowledge than I 
> have...
> 
> Thanks,
> 
> Rodolfo
> 
>
_________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months
> FREE*. 
> http://join.msn.com/?page=features/virus
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com