+
+#if NET_2_0
+ codeField.Attributes = MemberAttributes.Private;
+ CodeMemberProperty codeProperty = new CodeMemberProperty ();
+ codeProperty.Name = propName;
+ codeProperty.Type = new CodeTypeReference (map.TypeFullName);
+ codeProperty.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ codeProperty.HasGet = codeProperty.HasSet = true;
+ CodeExpression ce = new CodeFieldReferenceExpression (new CodeThisReferenceExpression(), varName);
+ codeProperty.SetStatements.Add (new CodeAssignStatement (ce, new CodePropertySetValueReferenceExpression()));
+ codeProperty.GetStatements.Add (new CodeMethodReturnStatement (ce));
+ CodeTypeDeclaration.Members.Add (codeProperty);
+#else
+ codeField.Attributes = MemberAttributes.Public;
+#endif