Class OppositeAttribute
Specifies the opposite of a given property
[AttributeUsage(AttributeTargets.Property)]
public class OppositeAttribute : Attribute
- Inheritance
-
OppositeAttribute
- Inherited Members
Constructors
OppositeAttribute(Type, string)
Creates a new instance
public OppositeAttribute(Type oppositeType, string propertyName)
Parameters
oppositeType
Typethe type where the opposite property is defined
propertyName
stringthe name of the opposite property
Exceptions
- ArgumentNullException
thrown if either oppositeType or propertyName is null
Properties
Property
The opposite property
public PropertyInfo Property { get; }