Keysight Pathwave 89600 VSA .NET API
SetEnumFromInt32 Method
See Also 
Agilent.SA.Vsa.Interfaces Assembly > Agilent.SA.Vsa Namespace > EnumUtilities Class : SetEnumFromInt32 Method


target
The object on which to access the flags-type enumerated property.
propertyName
The name of the flag-type enumerated property.
value
The value from which to set the property.

Glossary Item Box

This method sets the value of the specified property from the supplied 32-bit integer.

Syntax

Visual Basic (Declaration) 
Public Shared Sub SetEnumFromInt32( _
   ByVal target As RemotableObject, _
   ByVal propertyName As String, _
   ByVal value As Integer _
) 
C# 
public static void SetEnumFromInt32( 
   RemotableObject target,
   string propertyName,
   int value
)
C++/CLI 
public:
static void SetEnumFromInt32( 
   RemotableObject^ target,
   String^ propertyName,
   int value
) 

Parameters

target
The object on which to access the flags-type enumerated property.
propertyName
The name of the flag-type enumerated property.
value
The value from which to set the property.

Exceptions

ExceptionDescription
System.ArgumentExceptionIs raised if either the target or propertyName argument is null, or if the propertyName property cannot be found on target.
System.InvalidOperationExceptionIs raised of the type of the named property is not a flag-type enumeration, or if the named property is not writable.

Remarks

Some 3rd party packages are unable to manipulate flag-type enumerations. This method allows such packages to set a flag-type enumerated value from a 32-bit integer. The package can then use bitwise integer operations to construct an integer containing the required flags.

Requirements

Target Platforms: Windows 11 Professional or Enterprise; Windows 10 Professional, Enterprise, or Education (64-bit)

See Also