public static T[] ToArray<T>(IEnumerable<T> e) {
return e.ToArray();
}
I get the following compiler error:
Error 1
System.Collections.Generic.IEnumerable<T>does not contain a definition forToArrayand no extension methodToArrayaccepting a first argument of typeSystem.Collections.Generic.IEnumerable<T>could be found (are you missing a using directive or an assembly reference?
ただし、MSDN リファレンスにはこの方法がリストされています。ここで何が問題なのですか?