LINQ 쿼리에서 전화와 같은 문자열이, 내가 그것을 제거, 당신은 당신의 New With
블록의 끝에 추가 쉼표가 표준형식 왜이 일을 못해
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