Re: GetHashCode and variable names given by VS Designer
From: Jeffrey Tan[MSFT] (v-jetan_at_online.microsoft.com)
Date: 11/29/04
- Previous message: MajorTom: "paper size and font for roll paper"
- In reply to: LF: "Re: GetHashCode and variable names given by VS Designer"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Nov 2004 09:27:06 GMT
Hi LF,
Thanks for your posting!!
After trying your code snippet I have reproduced out this issue.
I suspect that VS.net designer will store the CodeDOM references in
hashtable, so when generating the reference, it will query the object's
GetHashCode method. Because you apply the string.GetHashCode logic to the
Test.GetHashCode method, designer will generate the same reference names
for the Test items with the same string field.
I think this behavior is by design. I am not sure why you use
isComplete=false for InstanceDescriptor, your Test class has only one field
"Data", so when use set it in Test's constructor, all the information for
Test class is complete, isComplete=true for InstanceDescriptor is more
suitable for this senario. And using isComplete=false for
InstanceDescriptor will not have such problem in VS.net.
If you have any other concern on this issue, please feel free to tell me.
Thanks
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
- Previous message: MajorTom: "paper size and font for roll paper"
- In reply to: LF: "Re: GetHashCode and variable names given by VS Designer"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|