2017-05-29 92 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;如果代碼還沒有。

另外,只需從您的代碼中刪除它們。

相關問題