【发布时间】:2019-07-15 18:48:00
【问题描述】:
.NET Core 有一个method,其签名如下:
.Replace(string old, string @new, StringComparison comp)
而 .NET Standard 仅具有此 method。
.Replace(string old, string @new)
能够在 Web 项目中使用它的 .NET Core 版本,但在引用的库项目中却不行,这感觉很奇怪。
我怀疑我的问题的答案是否定的,但想确定一下。
【问题讨论】:
-
您可以加载程序集并使用反射:)。但是你必须在 .net 核心端引入一个扩展方法。
标签: c# .net-core .net-standard