C# FileInfo查找文件包含字符个数
string result = string.Empty;string path = @"D:\C#\ConsoleApplication1\ConsoleApplication1\stdafx.h";FileInfo file = new FileInfo(path);result = file.OpenText().ReadToEnd();int i = Regex.Matches(result, "#include").Count;
原创
2021-08-29 16:40:59 ·
219 阅读 ·
0 评论