如何声明System.Collections.Generic.IEnumerable类型的变量?
How to declare variable of the type System.Collections.Generic.IEnumerable?
如何只声明System.Collections.Generic.IEnumerable类型的变量?
如果我尝试:
var selectedData="";
type selectedData=null;
我收到错误。
刚刚
System.Collections.Generic.IEnumerable selectedData;
您稍后可以在您的代码中使用它。
System.Collections.Generic.IEnumerable<dynamic>
因为 db.Query
的结果是动态行。 C# 编译器在编译时不知道查询的类型 return.
如何只声明System.Collections.Generic.IEnumerable类型的变量?
如果我尝试:
var selectedData="";
type selectedData=null;
我收到错误。
刚刚
System.Collections.Generic.IEnumerable selectedData;
您稍后可以在您的代码中使用它。
System.Collections.Generic.IEnumerable<dynamic>
因为 db.Query
的结果是动态行。 C# 编译器在编译时不知道查询的类型 return.