Skip to content

Commit 0f3a70d

Browse files
committed
fix: remove '_' from auto property naming in netframework classic
1 parent 10593a5 commit 0f3a70d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AutoQueryable/Extensions/TypeBuilderExtension.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public static class TypeBuilderExtension
99
private static void AddProperty(this TypeBuilder typeBuilder, string propName, PropertyAttributes attributes, Type propertyType) {
1010
const MethodAttributes getSetAttr = MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.SpecialName;
1111

12-
var field = typeBuilder.DefineField("_" + propName, propertyType, FieldAttributes.Private);
12+
var field = typeBuilder.DefineField(propName, propertyType, FieldAttributes.Private);
1313

1414
var property = typeBuilder.DefineProperty(propName, attributes, propertyType, new Type[] { });
1515

@@ -34,7 +34,7 @@ private static void AddProperty(this TypeBuilder typeBuilder, string propName, P
3434

3535
public static void AddProperty(this TypeBuilder typeBuilder, string propName, PropertyInfo propertyInfo)
3636
{
37-
typeBuilder.AddProperty(propName, propertyInfo.Attributes,propertyInfo.PropertyType);
37+
typeBuilder.AddProperty(propName, propertyInfo.Attributes, propertyInfo.PropertyType);
3838
}
3939

4040
public static void AddProperty(this TypeBuilder typeBuilder, string propName, Type propertyType)

0 commit comments

Comments
 (0)