1 using System
.Collections
.Generic
;
3 class CantCastGenericListToArray
5 public static void Main(string[] args
)
7 IList
<string> list
= new string[] { "foo", "bar" }
;
8 string[] array
= (string[])list
;
9 if (list
.Count
!= array
.Length
)
11 throw new System
.ApplicationException();