T
tsteinke
I noticed somthing. The native Array Types implement the IList
interface. However they do not contain all the methods in the
interfaces they implement. for example...
int[] test=new int[100];
test.Add(5); <<<< This is a Compile Error
However
if(test is IList)
{
IList list=test;
list.Add(123);
}
Comiles Just fine and causes a runtime exception when Add is called.
How is this possible?! Is there a way to hide methods of an interface
when you implement it?
Thomas
interface. However they do not contain all the methods in the
interfaces they implement. for example...
int[] test=new int[100];
test.Add(5); <<<< This is a Compile Error
However
if(test is IList)
{
IList list=test;
list.Add(123);
}
Comiles Just fine and causes a runtime exception when Add is called.
How is this possible?! Is there a way to hide methods of an interface
when you implement it?
Thomas