string.Format中加个@

@表示后面跟的字符串不进行转义,

举例说明,比如:

string.Format(@"{0}\Data\", strRootPath)

比如后里的\就直接表示\符串,{0} 的值是用strRootPath 值替换

string.Format(@"{0}\Data\", strRootPath)

你可能感兴趣的:(string.Format中加个@)