なぜこのエラーが発生するのかわかりません。私のプロジェクトには、次のような 1 つのメソッドを持つ 1 つのクラスしかありません。
public static class Extensions
{
public static string Chop(this string s, int length)
{
...
return "";
}
}
ビューでこれを次のように呼び出しています: @item.PostContent.Chop(20)
コンパイラ エラーが発生しています:
The call is ambiguous between the following methods or properties: 'Extensions.Chop(string, int)' and 'Extensions.Chop(string, int)'
どんな助けでも大歓迎です。ありがとうございました。