PropertyValuesExtensionMethodsHasFlag Method

Checks whether an object has a specific boolean property and it is true.

Definition

Namespace: MFiles.VAF.Common
Assembly: MFiles.VAF (in MFiles.VAF.dll) Version: 24.1.706.1
C#
public static bool HasFlag(
	this PropertyValues props,
	int propID,
	bool defaultValue = false
)

Parameters

props  PropertyValues
The property values collection.
propID  Int32
The PropertyDef ID.
defaultValue  Boolean  (Optional)
The default value to use in case where the property is missing or it doesn't have a value.

Return Value

Boolean
Returns defaultValue if the property was not found, if it was not boolean, or was not set to true.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type PropertyValues. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also