Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static string readFile(string path)
- {
- StringBuilder stringFromFile = new StringBuilder();
- StreamReader SR;
- string S;
- SR = File.OpenText(path);
- S = SR.ReadLine();
- while (S != null)
- {
- stringFromFile.Append(SR.ReadLine());
- }
- SR.Close();
- return stringFromFile.ToString();
- }
- public static string readFile(string path)
- {
- return File.ReadAllText(path);
- }
- S = SR.ReadLine();
- while (S != null)
- {
- stringFromFile.Append(SR.ReadLine());
- }
- S = SR.ReadLine();
- while (S != null)
- {
- stringFromFile.Append(S = SR.ReadLine());
- }
- S = SR.ReadLine();
- while (S != null){
- stringFromFile.Append(S);
- S = SR.ReadLine();
- }
- return System.IO.File.ReadAllText(path);
- var str = System.IO.File.ReadAllText(path);
- return str.Replace(Environment.NewLine, "");
- var info = new FileInfo(path);
- var sb = new StringBuilder((int)info.Length);
Add Comment
Please, Sign In to add comment