Looking for C# equivalent of scanf

后端 未结 9 1129
误落风尘
误落风尘 2020-11-29 09:51

I used to code in C language in the past and I found the scanf function very useful. Unfortunately, there is no equivalent in C#.

I am using using it to

9条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 10:39

    Since the files are "semi-structured" can't you use a combination of ReadLine() and TryParse() methods, or the Regex class to parse your data?

提交回复
热议问题