Guys i am trying to use the following lines of code, but when i check out the file that is being saved, all i see is the exact same text. but not the converted bytes, What am i doing wrong?
String text = "Line 1" + Environment.NewLine;
text += "Line 2" + Environment.NewLine;
text += "Line 3" + Environment.NewLine;
text += "Line 4" + Environment.NewLine;
Byte[] b = Encoding.ASCII.GetBytes(text);
File.WriteAllBytes(path, b);
Loading

VulpesRank #55 · 29.2K reputationPosted Aug 2, 2012, 6:36 AM EDT
For example, try running this program and then opening the resulting text file with notepad:
VulpesRank #55 · 29.2K reputationPosted Aug 2, 2012, 4:41 AM EDT
kiran murthy13 reputationPosted Aug 2, 2012, 5:41 AM EDT
kiran murthy13 reputationPosted Aug 2, 2012, 6:58 AM EDT
VulpesRank #55 · 29.2K reputationPosted Aug 2, 2012, 7:09 AM EDT
You should see output like this:
54 68 65 20 71 75 69 63 6b 20 62 72 6f 77 6e 20
66 6f 78 20 6a 75 6d 70 73 20 6f 76 65 72 20 74
68 65 20 6c 61 7a 79 20 64 6f 67
kiran murthy13 reputationPosted Aug 2, 2012, 7:47 AM EDT
VulpesRank #55 · 29.2K reputationPosted Aug 2, 2012, 8:36 AM EDT
kiran murthy13 reputationPosted Aug 3, 2012, 1:43 AM EDT