GetNullableValue method (WinStudio scripts)
Applies To
- IWSFormComponent interface
- IWSIDOProperty interface
- IWSVariable interface
- IGlobalScriptParm interface
Definition
Returns the value of an object as a given nullable data type.
Syntax
object.GetNullableValue( Of datatype ) ( )
Part | Description |
object | Required. Reference to an object that can contain a null value. |
datatype | Required. A data
type that can contain a null value.
For a list of valid data types, see the "Remarks" section. |
Remarks
Valid data types for this method include:
Boolean | Double | Integer | String |
Byte | Guid | Long | UInt16 |
Char | Int16 | SByte | UInt32 |
DateTime | Int32 | Short | UInt64 |
Decimal | Int64 | Single |
Example
Dim MyDecimalValue As Nullable(Of Decimal) = _ ThisForm.Variables("MyDecimalVar").GetNullableValue(Of Decimal)() If Not MyDecimalValue.HasValue Then Application.ShowMessage("MyDecimalVar has no value!") Else Application.ShowMessage("MyDecimalVar is " & MyDecimalValue.Value.ToString()) End If