1

I have copied a useful class StringExtensions from Given full path, check if path is subdirectory of some other path, or otherwise but when I put it in my solution (VS 2013 Pro) I get the error message The Type or Namespace [CanBeNull] could not be found and The Type or Namespace [NotNull] could not be found

from the following code lines

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

My project include using System; How can I get rid of these errors?

SimonKravis
  • 553
  • 1
  • 3
  • 24

1 Answers1

4

They are part of Resharper Annotations. Install JetBrains.Annotations via Nuget.

Then do using JetBrains.Annotations; if the code doesn't have it already.

Alternatively, just remove them from your code.

Ilian
  • 5,113
  • 1
  • 32
  • 41