Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Purpose of form1.designer.cs and form1.resx

Tags:

c#

winforms

I've been doing vb.net for a while and I don't understand the purpose of these two files:

  • form1.designer.cs
  • form1.resx

Can someone please explain them to me?

like image 503
Alex Gordon Avatar asked Apr 11 '10 23:04

Alex Gordon


2 Answers

form1.designer.cs is an auto-generated file that corresponds to form1.cs. The idea is that the Visual Studio form designer can put its auto-generated code in form1.designer.cs without having to worry about messing up any changes that you may have made.

form1.resx is most commonly used for storing strings that you want to translate into different languages so you don't hardcode them into your app.

like image 146
sblom Avatar answered Oct 08 '22 14:10

sblom


The .designer.cs contains the controls and layout of the form, the .resx contains stuff like resources and language dictionaries.

like image 23
Danny Varod Avatar answered Oct 08 '22 15:10

Danny Varod