
“\\” Path String
Jul 21, 2017 · 1 min read
การจัดการกับ \\ ใน path หรือ string อื่นๆในโปรแกรมควร ใช้ @ ขึ้นต้น เพื่อให้สามารถใช้ \ เพียงตัวเดียว
string pathFile = "C:\\directory\\myfile.txt";vs
string pathFile = @"C:\directory\myfile.txt";
การจัดการกับ \\ ใน path หรือ string อื่นๆในโปรแกรมควร ใช้ @ ขึ้นต้น เพื่อให้สามารถใช้ \ เพียงตัวเดียว
string pathFile = "C:\\directory\\myfile.txt";vs
string pathFile = @"C:\directory\myfile.txt";