Pet*_*r17 4 .net c# generics syntax
我有一个关于跟随变量声明的问题.那是什么意思?
List<string>.Enumerator enumerator
List是泛型类型,其中string用作类型参数.之后怎么解释.Enumerator?
dig*_*All 8
List<T>在其中有一个嵌套类,称为Enumerator.
List<T>
Enumerator
所以它的类型定义是List<T>.Enumerator(在你的情况下T是a string).
List<T>.Enumerator
T
string
PS
其实,List<T>.Enumerator是struct,不是class,反正类型定义是相同的.
struct
class
事实上,对于所有嵌套类型,它始终是 OuterType.NestedType
OuterType.NestedType
归档时间:
14 年,12 月 前
查看次数:
307 次
最近记录: