Try to find a property, that can be managed by NHibernate, from a given type.
Namespace: NHibernate.UtilAssembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)
Syntax
C# |
---|
public static bool HasProperty( this Type source, string propertyName ) |
Visual Basic |
---|
<ExtensionAttribute> _ Public Shared Function HasProperty ( _ source As Type, _ propertyName As String _ ) As Boolean |
Visual C++ |
---|
[ExtensionAttribute] public: static bool HasProperty( Type^ source, String^ propertyName ) |
Parameters
- source
- Type: System..::..Type
The given Type.
- propertyName
- Type: System..::..String
The name of the property to find.
Return Value
true if the property exists; otherwise false.Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Remarks
When the user defines a field.xxxxx access strategy should be because both the property and the field exists.
NHibernate can work even when the property does not exist but in this case the user should use the appropiate accessor.