C# で次のことを行う方法はありますか? それは存在しますか、それとも他にどのような方法を使用する必要がありますか?
string t = "joke";
string sentence = "there is no joke here";
string[] array = sentence.Split(" ".ToCharArray());
//here is the kicker
int count = array.indexOf(t);
return count;
これは 3?? を返すはずです。