C# 找不到类型或命名空间[CanBeNull]
我从中复制了一个有用的类StringExtensions,但当我将其放入我的解决方案(VS 2013 Pro)时,我收到了错误消息 找不到类型或命名空间[CanBeNull],也找不到类型或命名空间[NotNull] 从以下代码行C# 找不到类型或命名空间[CanBeNull],c#,visual-studio,C#,Visual Studio,我从中复制了一个有用的类StringExtensions,但当我将其放入我的解决方案(VS 2013 Pro)时,我收到了错误消息 找不到类型或命名空间[CanBeNull],也找不到类型或命名空间[NotNull] 从以下代码行 public static string WithEnding([CanBeNull] this string str, string ending) public static string Right([NotNull] this string value,
public static string WithEnding([CanBeNull] this string str, string ending)
public static string Right([NotNull] this string value, int length)
我的项目包括使用系统;
如何消除这些错误?它们是Resharper注释的一部分。通过Nuget安装 然后使用JetBrains.Annotations执行
代码>如果代码尚未包含它
或者,只需从代码中删除它们。它们是Resharper注释的一部分。通过Nuget安装
然后使用JetBrains.Annotations执行代码>如果代码尚未包含它
或者,只需从代码中删除它们