c# - 通用 NOT 约束 where T : ! IEnumerable

标签 c# .net generics ienumerable

根据标题,是否可以在 C# 4 中声明类型否定约束?

最佳答案

不 - 在 C# 或 CLR 中都没有这样的概念。

关于c# - 通用 NOT 约束 where T : ! IEnumerable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8727523/

相关文章:

c# - WithArgumentsForConstructor() 扩展方法调用构造函数

.net - 如何将 XMLSerializer 与包含 IList<T> 成员的 CaSTLe ActiveRecord 结合使用

c# - 如何在 MS Word 中以编辑模式启动 template.dot 文件

c# - 与单例模式设计中使用的相同类型的类属性

c# - 验证 ORA-01438 : value larger than specified precision allowed for this column

c# - 需要来自 WebBrowser 控件的 HTTP 状态(200/500/等)代码

swift - 使用 Swift 函数,该函数采用通用序列

java - 泛型和字段如何在 Standalone Java 应用程序中辅助 DAO 模式

java - RAD eclipse中如何指向其他JAVA版本

javascript - 在 HTML 表格中显示/隐藏图像