Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从如下所示的文本文件中读取特定数据:
.
如何使用 C# 或 Vue.js 做到这一点?
在 C# 中,您可以使用 File.ReadAllLines() 读取所有行(请参阅https://docs.microsoft.com/en-us/dotnet/api/system.io.file.readalllines?view=netcore-3.1)。
遍历这些行(或使用 Linq Where() 语句),直到找到带有“total”的行。