怎样用C#判断一个字符串是否包含另一个字符串

2025-03-24 10:52:42
推荐回答(1个)
回答(1):

string op = "2221456";
string oq="214";
if (op.IndexOf(oq, 0) != -1) { MessageBox.Show("包含"); }