在这个上,这里有下面的代码示例来介绍泛型方法?“布尔”之前提到泛型?此方法只是返回布尔类型。当我删除<K, V>编译器时,会抛出错误,并声明为cannot make a static reference to the non-static type K。公共空setValue(V值){ this.value =值;}
在相同的链接上,我们有上面的方法,那么为什么这里
public override string ToString() => $"Reference<{typeof(T).Name}> ({this.id})";在这段代码中,我有带有静态字段的类new Reference<T>(); id =0在dotnet中,当您在引擎盖下使用泛型类型时,创建了新的非泛型类型。但