Table of Contents

Class OppositeAttribute

Namespace
NMF.Models
Assembly
NMF.Models.dll

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 Type

the type where the opposite property is defined

propertyName string

the name of the opposite property

Exceptions

ArgumentNullException

thrown if either oppositeType or propertyName is null

Properties

Property

The opposite property

public PropertyInfo Property { get; }

Property Value

PropertyInfo