2017-05-29 86 views
-1

我从Given full path, check if path is subdirectory of some other path, or otherwise复制了一个有用的类StringExtensions,但是当我将它放入我的解决方案(VS 2013 Pro)时,出现错误消息 Type或Namespace [CanBeNull]可能未找到,该类型或命名空间[NOTNULL]找不到无法找到类型或命名空间[CanBeNull]

从下面的代码行

public static string WithEnding([CanBeNull] this string str, string ending) 
public static string Right([NotNull] this string value, int length) 

我的项目包括使用系统; 我该如何摆脱这些错误?

回答

3

它们是Resharper注释的一部分。通过Nuget安装JetBrains.Annotations

然后做using JetBrains.Annotations;如果代码还没有。

另外,只需从您的代码中删除它们。

相关问题