【发布时间】:2015-08-27 11:42:50
【问题描述】:
我怎样才能得到用棍子在 ascii 艺术中编码的数字?
数字在一个 txt 文件中,它包含以下内容:
我必须将此 txt 文件转换为 3 2 1 4 5 1 4 5
我是这样阅读文本文件的:
using (StreamReader sr = new StreamReader("SourceFile.txt"))
{
String line;
// Read and display lines from the file until the end of
// the file is reached.
while ((line = sr.ReadLine()) != null)
{
sb.AppendLine(line);
}
}
string allines = sb.ToString();
现在,就像@Zotta 的答案一样,我必须保存在两个不同的字符串中(前 4 行和第二行,而不是 然后会更容易
【问题讨论】:
-
@displayName 谁为这次编辑投票? OP 不要求图书馆。
-
@HimBromBeere OP 批准了编辑...see history
-
@HimBromBeere:我知道。但是 OP 的原始问题太糟糕了,无法挽救。看看 OP 最终想要做什么,这是要问的问题,而不是 OP 最初提出的问题。