I know this is a silly mistake, but I can't figure out what's going on. I've created some extension methods and am trying to access them, but the default methods keep getting called:
namespace MyProject
{
public static class Cleanup
{
public static string cleanAbbreviations(this String str) {
if (str.Contains("JR"))
str = str.Replace("JR", "Junior");
return str;
}
public static bool Contains(this String str, string toCheck)
{//Ignore the case of our comparison
return str.IndexOf(toCheck, StringComparison.OrdinalIgnoreCase) >= 0;
}
public static string Replace(this String str, string oldStr, string newStr)
{//Ignore the case of what we are replacing
return Regex.Replace(str, oldStr, newStr, RegexOptions.IgnoreCase);
}
}
}