Is it possible to combine a normal class with a partial class like this:
public class ClassA
{
public string PropertyA {get; set;}
}
public partial class ClassA
{
public string PropertyB {get; set;}
}
The result of the code should look:
var instance = new ClassA();
instance.PropertyA = "Something";
instance.PropertyB = "Something else";
Does C# support this pattern?
Thank you all in advance!
No. All parts of a partial class have to include the
partialmodifier. From section 10.2 of the C# 4 language specification:(Emphasis mine.)