- using System;
- namespace PlayingAround {
- class ReadAll {
- public static void Main(string[] args) {
- string contents = System.IO.File.ReadAllText(@"C:\\t1");
- Console.Out.WriteLine("contents = " + contents);
- }
- }
- }
- //该片段来自于http://www.codesnippet.cn/detail/080620133939.html
来源: http://www.codesnippet.cn/detail/080620133939.html