I can use this snippet:
public object Obj
{
get;
set;
}
Like this:
public fubar()
{
...
Obj = SomeObject;
}
But cannot seem to use this snippet:
public object[] ObjectAsArray
{
get;
set;
}
Like this or any other way I have tried so far:
public fubar()
{
...
Obj[n] = SomeObject;
//or
var x = Obj[0] as SomeObject;
//or other ways...
}
I seem to be missing something here.
Can somebody give a simple example of the correct declaration of a C# property that is of type object[] and consumption thereof?