Sunday, July 12, 2009

Hi got a c# question on references and arrays?

Ok in Microsofts C# Creating an array of a class type yields what?





1. An array of object references.





2. An array of instances of that class.





3. An array of references of the class type.





Answer is appreciated

Hi got a c# question on references and arrays?
// if this is what you mean





object[] forum = new object[] { typeof( String ), typeof( Enum ) };





foreach ( object o in forum )


{


Console.WriteLine( o );


}





// then the answer is 3


No comments:

Post a Comment