public class BsonObjectAttribute: BsonRepresentationAttribute
{
public BsonObjectAttribute(BsonType representation)
{
base(representation);
}
}
I am trying to create an attribute from BsonRepresentationAttribute. But i am getting two compilation errors as follow
There is no argument given that corresponds to the required formal parameter 'representation' of BsonRepresentationAttribute.BsonRepresentationAttribute(BsonType)
and
Use of keyword 'base' is not valid in this context
This isn't attribute-specific - you're just not using the right syntax to chain from one constructor to a base constructor. It should be:
public BsonObjectAttribute(BsonType representation) : base(representation)
{
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With