의 비 정적 필드 메서드 또는 속성 오류를 참조 할 수 없습니다. Windows 양식 응용 프로그램을 실행하면 initializer cannot reference the nonstatic field method or property
이 표시됩니다.필드 초기화 프로그램에서 C#
string lia = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
StreamReader fileitem=new StreamReader(Path.Combine(lia,"dataset.txt")); //Error line
가늘며, lia
을 문자열로 인식 할 수 없습니다. 아이디어가 있으십니까?
두 줄이 서로 이어지는 것이 확실합니까? – nvoigt