torsten's .NET blog In the end, everything is a gag [Ch. Chaplin]
# Tuesday, April 27, 2004
Visual Studio 7 Forms Designer issue: order of classes is important

Today I stumbled over this issue with the Visual Studio 7 Forms Designer:

 "The class Main 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."

Here is the sample code:

namespace Test
{
 public class MyEventArgs {
  public string Param1;
  public bool Param2;
 }
 /// <summary>
 /// Summary description for Main Form.
 /// </summary>
 public class Main : System.Windows.Forms.Form
 {
 }
}

So: avoid this by using separate files for each class if possible or keep at least the forms class code alone.

Technorati tags:  | 
Tuesday, April 27, 2004 5:51:34 PM (W. Europe Daylight Time, UTC+02:00)    #  Comments [0]  | 
Comments are closed.
Navigation

Like RSS Bandit? Make a donation to help support its development and maintenance. As little as 1€ will help.

Make payments with PayPal - it's fast, free and secure!
Site supporters
On this page....
<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910

SUBSCRIBE RSS GeoURL e-mail

Search
Categories
Blogroll

newtelligence dasBlog 2.3.9074.18820

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

Join WebHost4Life.com