컴파일 타임에 형식 문자열을 확인할 수있는 방법이 있습니까?형식 문자열 - 컴파일 시간 검사
예 :
Console.WriteLine("{0} is a really {1} site", "stackoverflow.com", "cool");//this will run
것은 //이 아니라 하나의 인수가
Console.WriteLine("{0} is a really {1} site", "stackoverflow.com");
Exception:"Index (zero based) must be greater than or equal to zero and less than the size of the argument list."
및 서식 캐릭터 라인 (올바른 형식이 아닌 경우, 즉 "}"를 누락 공급되는 예외를 줄 것이다 이후 1)
Console.WriteLine("{0} is a really {1 site", "stackoverflow.com","cool");
Exception: Input string was not in a correct format.