diff --git a/Il2CppInspector.Common/Reflection/MemberInfo.cs b/Il2CppInspector.Common/Reflection/MemberInfo.cs index 22761cc..6b0fdc7 100644 --- a/Il2CppInspector.Common/Reflection/MemberInfo.cs +++ b/Il2CppInspector.Common/Reflection/MemberInfo.cs @@ -26,7 +26,7 @@ namespace Il2CppInspector.Reflection { public abstract MemberTypes MemberType { get; } // Name of the member - public virtual string Name { get; protected set; } + public virtual string Name { get; set; } // Name of the member with @ prepended if the name is a C# reserved keyword, plus invalid characters substituted public virtual string CSharpName => Constants.Keywords.Contains(Name) ? "@" + Name : Name.ToCIdentifier(); diff --git a/Il2CppInspector.Common/Reflection/PropertyInfo.cs b/Il2CppInspector.Common/Reflection/PropertyInfo.cs index bc3a715..c684ae5 100644 --- a/Il2CppInspector.Common/Reflection/PropertyInfo.cs +++ b/Il2CppInspector.Common/Reflection/PropertyInfo.cs @@ -29,8 +29,6 @@ namespace Il2CppInspector.Reflection { public bool IsAutoProperty => DeclaringType.DeclaredFields.Any(f => f.Name == $"<{Name}>k__BackingField"); - public override string Name { get; protected set; } - public override string CSharpName { get { // Explicit interface implementation