Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it safe to alter a Designer.cs file?

Resharper directs my attention to this line of code in Form1.Designer.cs:

private System.ComponentModel.IContainer components = null;

...with "Field can be made readonly"

Is it safe to acquiesce, or should I just chalk it up to Resharper being a little too persnickety, and ignore it?

Resharper also flags Designer.cs for many other violations, such as:

Redundant explicit delegate creation

and, several times:

Qualifier 'this.' is redundant

UPDATE

Here's how my settings look (I didn't alter them):

enter image description here

So...does this mean I need to manually add all those file extensions seen in Igal Tabachniks' scream shot? It seems it is set up for Windows 8 projects only; the quick-and-dirty util that "threw" these messages is a plain old Windows Forms app.

like image 908
B. Clay Shannon-B. Crow Raven Avatar asked Dec 15 '22 09:12

B. Clay Shannon-B. Crow Raven


1 Answers

It is safe to alter the Designer.cs file, but I would not advise it. The file is automatically generated and it will be generated again whenever you change the corresponding forms file. At top of the file it should mention this in a comment: All changes will be lost.

like image 84
user1908061 Avatar answered Dec 24 '22 14:12

user1908061