Home > Enterprise >  Do .resx and .designer files need to be in the same order?
Do .resx and .designer files need to be in the same order?

Time:02-22

I'm merging my code with a new release (First time) and I'm copying over changes using winmerge. My question is do the .resx and .designer files have to line up, or can they be in any order. So line 1 in .resx and line 1 in .designer would have to be the same resource, or would it work if line 1 was line 200 in the .designer. Thanks.

CodePudding user response:

That doesn't matter. The elements in the resx file are addressed by name, not by index. So the resx might have an entry such as <data name="$this.Icon">...</data> and the .designer.cs contains the reference to this entry in the form this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); The order of the definitions doesn't matter at all.

  •  Tags:  
  • .net
  • Related