Error system.collections.generis.ienumerable

本文关键字:ienumerable generis collections system Error | 更新日期: 2023-09-27 18:22:45

string[] name = { "masha", "zhenya", "nastya" };
string[] m = (from g in name  select name).ToArray<string>();//error here 

error system.collections.generis.ienumerable doesnot 将定义连接到数组

Error system.collections.generis.ienumerable

您应该

包含对System.Linq的引用,并将select name更改为select g