Serialization of inherited class
description
Hello
I have a class which inherits from another class and then changes the parameter of one of the inherited variables. Eg.
class A
{
int no;
}
class B: A
{
bool no;
}
Now, I create an object of B and serialize it by "JsonConvert.SerializeObject(b)", on doing this I am getting an error:
A member with the name 'b' already exists on 'Sample.B'. Use the JsonPropertyAttribute to specify another name.
What to do?