When I use WinForms (C#) designer in VS2010, it still generates code that StyleCop complains about.

Posted by Hamish Grubijan on Stack Overflow See other posts from Stack Overflow or by Hamish Grubijan
Published on 2010-06-07T22:04:31Z Indexed on 2010/06/07 22:12 UTC
Read the original article Hit count: 206

Some problems that I recall (there may be more):

  1. Includes regions
  2. Does not use this. prefix for member variables and methods
  3. Includes comments like the one below ( having // by itself catches the eye of StyleCop)

    //
    // fileNameTextBox
    // 
    

If I make a change to the text, and then open the designer again, and screws up my previously perfected fruits of hard labor. How did / would you solve this problem?

I heard but did not personally experience a similar problem with WPF. How did / would you fix that?

Thanks.

© Stack Overflow or respective owner

Related posts about c#

Related posts about visual-studio-2010