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.
我在文本文件中有这些数据
文件1.txt
111|test1 222|test2 333|test3
文件2.txt
111|test4 444|test5 555|test6
最后"output.text"将包含
"output.text"
111|test1
所以基本上忽略管道之后的数据,但最后保留该数据。我怎样才能在vb.netor中做到这一点c#?
vb.net
c#
使用String.Split
N:B:返回一个字符串数组,其中包含此实例中的子字符串,这些子字符串由指定字符串或 Unicode 字符数组的元素分隔。