110,535
社区成员
发帖
与我相关
我的任务
分享
string A=“L2”;
StreamReader sr = new StreamReader(@"D:\item.txt", Encoding.Unicode, false);
char[] separator = { '\t' };
sLine = sr.ReadLine();
while(sLine!=null)
{
strArray = sLine.Split(separator, System.StringSplitOptions.RemoveEmptyEntries);
foreach (string str in strArray)
{
if(str==A)
Console.WriteLine("发现L2");
}
}