MfNull

Namespace ›› System ››
Parent Previous Next

MfNull Class

(Inherits from MfNullBase)

Represents Null object for handling Null values. This is a Singleton Class. to access instance use MfNull.Null

Constructors


Name

Description

Constructor()

Initializes a new instance of the MfNull class. Use MfNull.Null Singleton access

Properties


Name

Description

Null

Gets a Singleton instance of MfNull. Inherited From MfNullBase

Value

Gets the Value representing a Null.

Methods


Name

Description

CompareTo()

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. Inherited from MfObject.

Equals(value)

Gets if this instance Value is the same as the value. Overrides MfObject.Equals()

GetInstance()

Gets the instance of the Singleton. Overrides MfNullBase.GetInstance()

GetObjOrNull(obj)

Checks to see if an object is null and returns obj if not null; Otherwise MfNull.Null

GetType()

Gets the Type for the for the Class .Inherited from MfObject.

Is(ObjType)

Gets if current instance of MfNull is of the same type as ObjType or derived from ObjType. Overrides MfObject.Is().

IsInstance()

Get if the current class is an instance. Inherited from MfObject.

IsNull(obj)

Get if the obj parameter is null or MfNull.

MemberwiseClone()

Creates a shallow copy of the current MfObject instance. Inherited from MfObject.

ToString()

Gets MfNull.Null.Value. Overrides MfObject.ToString()

Example

MyFunction(obj) {
   if (obj := "") {
       this.innerList.Insert(MfNull.Null)
   }
}
GetObj(index) {
   obj := this.innerList.Item[index]
   if (MfNull.IsNull(obj)) {
       return MfNull.Null.Value
   }
   return obj
}