2019年8月15日

C# .net core 相对路径转绝对路径 (官方示例)

摘要: public static string GetAbsolutePath(string relativePath) { FileInfo _dataRoot = new FileInfo(typeof(Program).Assembly.Location); string assemblyFolderPath = _dataRoot.Directory.FullName; string fullP 阅读全文

posted @ 2019-08-15 14:13 马什么梅 阅读(2097) 评论(0) 推荐(0) 编辑

C# where 泛型类型约束

摘要: 泛型定义中的 where 子句指定对用作泛型类型、方法、委托或本地函数中类型参数的参数类型的约束。 约束可指定接口、基类或要求泛型类型为引用、值或非托管类型。 它们声明类型参数必须具备的功能。 作为约束使用的类型必须是接口、非密封类或类型参数。 可以指定泛型是class ,struct ,Syste 阅读全文

posted @ 2019-08-15 13:51 马什么梅 阅读(455) 评论(0) 推荐(0) 编辑

导航