从文本文件中获取包含特殊字符的数据 [英] Grab data from textfile which include special characters
本文介绍了从文本文件中获取包含特殊字符的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我在这里遇到了一个大问题,我在其中使用数组存储从文本文件中获取的临时数据.但是,某些数据包含特殊字符,例如"或@
完整示例:SPECIAL"FORCE"陆军
我如何将"字符包含在数组中?
Hi all,
I''ve faced the big problem here where I use an array to store temporary data that I grab from textfile. However, some of the data contains of special characters e.g. "" or @
Full example: SPECIAL "FORCE" ARMY
How may I include the "" characters to array?
推荐答案
我不认为这应该是一个问题:只需将文件读入数组即可:
I don''t see that it should be a problem: just read the file into an array:
Dim data As Byte() = File.ReadAllBytes("d:\Temp\MyTextFile.txt")
如果您不这样做,那您在做什么?
If you aren''t doing this, what are you doing?
这篇关于从文本文件中获取包含特殊字符的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文