Contains文字列
EndsWith→指定した文字列が含まれているかどうかを確認します。
構文
str.Contains(value, comparisonType?)使用例
下記の値を入力するとサンプルに即時反映されます。
string→hasWorld→Contains→Console→WriteLine→string text = "Hello, World!";
bool hasWorld = text.Contains("World");
Console.WriteLine(hasWorld); // True