No, this will not close the StreamReader. You need to close it. Using does this for you (and disposes it so it's GC'd sooner):
using (StreamReader r = new StreamReader("file.txt"))
{
allFileText = r.ReadToEnd();
}
Or alternatively in .Net 2 you can use the new File. static members, then you don't need to close anything:
variable = File.ReadAllText("file.txt");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…