FileStream fs = new FileStream("c:/something/somewhere/file.txt", FileMode.Open); //i don't know what you file is, it probably isn't this.
StreamReader sr = new StreamReader(fs);
string file = sr.ReadToEnd(); //'file' is your file...
file = file.SubString(1); //...only now it's missing the front
sr.Close();
fs = new FileStream("c:/something/somewhere/file.txt", FileMode.Create); //this will completely destroy your old file. harsh but fair.
StreamWriter sw = new StreamWriter(fs);
sw.WriteLine(file); //bingo.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.