C#で現在のユーザーのappdataフォルダー内のファイルから読み取ろうとしていますが、まだ学習中なので、これがあります:
int counter = 0;
string line;
// Read the file and display it line by line.
System.IO.StreamReader file = new System.IO.StreamReader("c:\\test.txt");
while ((line = file.ReadLine()) != null)
{
Console.WriteLine(line);
counter++;
}
file.Close();
// Suspend the screen.
Console.ReadLine();
しかし、常に現在のユーザーのフォルダーであることを確認するために何を入力すればよいかわかりません。