Constructor()

Namespace ›› System ›› MfNumberStyles ›› Methods ››
Parent Previous Next

Constructor()

OutputVar := new MfNumberStyles()
OutputVar := new MfNumberStyles(num)
OutputVar := new MfNumberStyles(instanceEnum)
OutputVar := new MfNumberStyles(enumItem1, enumItem2, enumItem3, ...)

Constructor()

Creates a new instance of MfNumberStyles class and set initial value to the value of None.

Constructor(num)

Creates a new instance of MfNumberStyles class and sets initial value to value of num.

Parameters

num

An integer value representing an Enumeration Value of MfNumberStyles.

Example

MyEnum := new MfNumberStyles(512) ; AllowHexSpecifier

Constructor(instanceEnum)

Creates a new instance of MfNumberStyles class an set the intial value to the value of instanceEnum.

Parameters

instanceEnum

an instance of MfNumberStyles whose Value is used to construct this instance.

Example

MyEnum := new MfNumberStyles() ; create instance with default value
MyEnum.Value := MfNumberStyles.Instance.AllowHexSpecifier.Value ; MyEnum.Value is now 512
MyEnum.AddFlag(MfNumberStyles.Instance.AllowExponent)           ; MyEnum.Value is now 640
MyEnum.AddFlag(MfNumberStyles.Instance.Float)                   ; MyEnum.Value is now 679
MfE := new MfNumberStyles(MyEnum) ; create a new instance and sets it value to the value of MyEnum
Msgbox % MFE.Value ; displays 679

Constructor(enumItem*)

Creates a new instance of MfNumberStyles and set its value enumItem value(s).

Parameters

enumItem

MfEnum.EnumItem value(s) must Enumeration(s) of MfNumberStyles

Example

MyEnum := new MfNumberStyles(MfNumberStyles.Instance.AllowHexSpecifier
           , MfNumberStyles.Instance.AllowExponent
           , MfNumberStyles.Instance.Float)
Msgbox % MyEnum.Value ; displays 679

Throws

Throws MfNotSupportedException if this sealed class is extended or inherited.
Throws MfArgumentException if arguments are not correct.