string logPath = HttpContext.Current.Server.MapPath("log.txt");//文件相当路径
System.IO.StreamWriter sw = new System.IO.StreamWriter(logPath, true, Encoding.UTF8);
sw.WriteLine("要写入的文本");
sw.Close();
0x41,0x42,0x43
因为ABC的ASCII码为65、66、67,将其转换为十六进制就是0x41.....