为什么惯于这项工作,我想手机格式为标准格式的字符串作为手机LINQ查询
Dim Patient = From line In System.IO.File.ReadAllLines("K:\PAT02.txt")
Select New With { _
Key .PatientID = line.substring(0,7).trim, _
.FirstName = line.substring(7,11).trim, _
.MiddleName = line.substring(18,1).trim, _
.LastName = line.substring(19,15).trim, _
.Home = (String.Format("{0:(###)###-####}", line.substring(112,10).trim)), _
}
什么问题?错误信息?例外? –
这可能重复:http://stackoverflow.com/questions/188510/how-to-format-a-string-as-a-telephone-number-in-c-sharp这里的标题是提到Linq,但实际上Linq在所提及的问题中完全不涉及 – Wasp