2011/07/28

[C#] Form 디자이너 클래스는 가장 먼저 선언 되어야 하네...

메인 폼의 클래스 위에 습관처럼 다른 클래스는 선언 하였다. 그리고 Form 디자인 창을 열었더니 아래와 같은 에러 메시지를 만났다.



"The class frmMain can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again."



C++에서의 습관으로 메인 클래스 위에 다른 작은 구조체나 클래스를 선언하여 사용하였는데 Windows Form을 사용하는 C# 프로그래밍에서는 Visual Studio에서 지원하는 디자이너를 사용하려면 그렇게 사용할 수가 없다. 좀 불편

Original Post : http://neodreamer-dev.tistory.com/558

No comments :

Post a Comment