[Mono-bugs] [Bug 82692][Wis] New - [automatic properties] generated field's name is unrelated to property name

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Sep 4 12:07:06 EDT 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jan.oravec at 6com.sk.


--- shadow/82692	2007-09-04 12:07:06.000000000 -0400
+++ shadow/82692.tmp.28814	2007-09-04 12:07:06.000000000 -0400
@@ -0,0 +1,37 @@
+Bug#: 82692
+Product: Mono: Compilers
+Version: 1.2
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: jan.oravec at 6com.sk               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: [automatic properties] generated field's name is unrelated to property name
+This is more wish than bug. It would be nice if generated field name was
+predictable from property name in automatic properties so that when object
+is serialized, class modified (e.g. changed order of properties), then
+deserialized, it would still work. Application with data model in db4o is a
+good example which would benefit from stable field name.
+I am not sure what specification says, but it seems that MSFT recognized
+this problem and recently changed .NET to use field name
+"<Name>k__BackingField" when property name is "Name".
+There are 2 recent articles with IL code showing usage of this new name:
+I do not have any MSFT products around, so I was not able to check this.
+It would be nice if Mono use same name pattern, so that serialization is
+compatible between Mono and .NET.

More information about the mono-bugs mailing list