Closed
Description
When serialize the following derived type, it will throw “access method DerivedTypeWithDifferentOverrides.get_Name4() failed”. This is because the generated code is wrong and it try to access the internal Name4 property.
public class BaseType
{
public virtual string Name1 { get; set; }
public string Name2 { get; set; }
public string Name3 { get; set; }
public string Name4 { get; set; }
public string @Name5 { get; set; }
}
public class DerivedTypeWithDifferentOverrides : BaseType
{
public override string Name1 { get; set; }
new public string Name2 { get; set; }
new public string Name3 { get; set; }
new internal string Name4 { get; set; }
new public string Name5 { get; set; }
}