[Mono-list] newby help
Andreas Jellinghaus
aj@dungeon.inka.de
Fri, 29 Mar 2002 19:56:15 +0100
is this code not correct?
class MyClass
{
...
public int this[int index] {
get {
return 0;
}
set {
Console.WriteLine("this[{0}] = {1}", index, value);
}
}
...
class Test
{
static void Main() {
...
// Indexer usage
a[3] = a[1] = a[2];
(process:19056): ** WARNING **: unhandled exception
System.NullReferenceException: "A null value was found where an object
instance was required"
in Mono.CSharp.TypeManager:CSharpName ()
while
a[1] = a[2];
is fine.
latest mono from cvs, and mcs/runtime from miguels webpage.
andreas