Visual Basic (Declaration) | |
---|---|
Public Shared Function GetEnumAsInt32( _ ByVal target As RemotableObject, _ ByVal propertyName As String _ ) As Integer |
C# | |
---|---|
public static int GetEnumAsInt32( RemotableObject target, string propertyName ) |
C++/CLI | |
---|---|
public: static int GetEnumAsInt32( RemotableObject^ target, String^ propertyName ) |
Parameters
- target
- The object on which to access the flags-type enumerated property.
- propertyName
- The name of the flag-type enumerated property.
Return Value
A 32-bit integer value representing the current value of the property.Exception | Description |
---|---|
System.ArgumentException | Is raised if either argument is null, or if the propertyName property cannot be found on target. |
System.InvalidOperationException | Is raised of the type of the named property is not a flag-type enumeration. |
Some 3rd party packages are unable to manipulate flag-type enumerations. This method allows such packages to retrieve a flag-type enumerated value as a 32-bit integer. The package can then use bitwise integer operations to test for specific flags.
Target Platforms: Windows 11 Professional or Enterprise; Windows 10 Professional, Enterprise, or Education (64-bit)