Is()

Namespace ›› System ›› MfInteger ›› Methods ››
Parent Previous Next

Is()

Overrides MfObject.Is().

OutputVar := instance.Is(ObjType)

Is(ObjType)

Gets if current instance of MfInteger is of the same type as ObjType or derived from ObjType.

Parameters

ObjType

The object or type to compare to this instance Type.
ObjType can be an instance of MfType or an object derived from MfObject or an instance of or a string containing the name of the object type such as "MfObject"

Returns

Returns true if current object instance is of the same Type as the ObjType or if current instance is derived from ObjType or if ObjType = "MfInt" or if ObjType = "MfInt32"; Otherwise false.

Remarks

If a string is used as the Type case is ignored so "MfObject" is the same as "mfobject"

Example

; MfInt is an alias for MfInteger
; MfInt32 is an alias for MfInteger
mfInt := new MfInt()
MsgBox % mfInt.Is(MfInt)        ; display 1 for true
MsgBox % mfInt.Is(MfInt16)      ; display 0 for false
MsgBox % mfInt.Is(MfPrimitive)  ; display 1 for true
MsgBox % mfInt.Is(MfInteger)    ; display 1 for true
MsgBox % mfInt.Is("MfInteger")  ; display 1 for true
MsgBox % mfInt.Is(MfInt32)      ; display 1 for true

mfInt := new MfInteger()
MsgBox % mfInt.Is(MfInt)        ; display 1 for true
MsgBox % mfInt.Is(MfInt64)      ; display 0 for false
MsgBox % mfInt.Is(MfObject)     ; display 1 for true
MsgBox % mfInt.Is(MfInt)        ; display 1 for true
MsgBox % mfInt.Is("MfInt32")    ; display 1 for true
MsgBox % mfInt.Is(MfInt32)      ; display 1 for true

mfInt := new MfInt32()
MsgBox % mfInt.Is(MfInt)        ; display 1 for true
MsgBox % mfInt.Is(MfInt16)      ; display 0 for false
MsgBox % mfInt.Is(MfValueType)  ; display 1 for true
MsgBox % mfInt.Is(MfInteger)    ; display 1 for true
MsgBox % mfInt.Is("MfInt")      ; display 1 for true
MsgBox % mfInt.Is(MfInt)        ; display 1 for true