mukul chakravarty

mukul chakravarty

  • NA
  • 25
  • 31.5k

C sharp conversions

Jun 12 2013 6:11 PM

Why int[] cannot be implicitly converted to system.Array ??

example: I wanted to do this-

int[] a=new int[5];

a=(int[])Enum.GetValues(typeof(post));

where post is an enum. Why did we require to cast LHS to int[]?? The GetValues() method returns arrays only..


Answers (1)