MfList

Namespace ›› System ››
Parent Previous Next

MfList Class

(Inherits from MfListBase)

MfList class exposes methods and properties used for common List and array type operations for strongly typed collections.

Links

Properties, Methods

Constructors


Name

Description

Constructor()

Initializes a new instance of the MfList class.

Properties


Name

Description

Count

Gets a value indicating if the MfListBase number of Elements. Inherited from MfListBase

IsFixedSize

Gets a value indicating if the MfListBase has a fixed size. Inherited from MfListBase

IsReadOnly

Gets a value indicating if the MfListBase is read-only. Inherited from MfListBase

Item[index]

Gets or sets the element at the specified index. Inherited from MfListBase

Methods


Name

Description

_NewEnum()

Returns a new enumerator to enumerate this object's key-value pairs. This method is usually not called directly, but by the for-loop or by GetEnumerator(). Inherited from MfListBase

Add(obj)

Adds an element to the end of the current instance. Inherited from MfListBase

AddAttribute()

Adds MfAttribute extended items to extended classes. Inherited from MfObject.

Clear()

Removes all elements from the instance and sets Count to Zero. Inherited from MfListBase

Clone()

Clones all the elements of the current instance an return  a new instance. Overrides MfListBase.Clone().

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.

Contains(obj)

Determines whether the MfListBase contains a specific element. Inherited from MfListBase

Equals(obj)

Compares obj to current instance to see if they are the same. Inherited from MfObject.

GetAttribute(index)

Gets an MfAttribute of the class. Inherited from MfObject.

GetAttributes()

Gets a MfGenericList of MfAttribute that Contains the attributes for the current class instance. Inherited from MfObject.

GetEnumerator()

Gets an enumerator. Inherited from MfEnumerableBase

IndexOf(obj)

Searches for the specified object or var and returns the index of the first occurrence within the entire instance. Inherited from MfListBase

Insert(index, value)

Inserts an element into the MfListBase at the specified index. Inherited from MfListBase

GetIndexOfAttribute(attrib)

Gets the zero-based index value of the position of MfAttribute within the instance of the class. Inherited from MfObject.

GetType()

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

HasAttribute(attrib)

Gets if the current instance of class derived from MfSystemException has MfAttribute. Inherited from MfObject.

Is(type)

Gets if current instance of object is of the same type. Inherited from MfObject. Inherited from MfObject.

IsInstance()

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

LastIndexOf(obj)

Searches for the specified object or var and returns the index of the last occurrence within the entire instance. Inherited from MfListBase

MemberwiseClone()

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

Remove(obj)

Removes the first occurrence of a specific object from the instance. Inherited from MfListBase

RemoveAt(index)

Removes the item at the specified index. Inherited from MfListBase

ToArray()

Returns a One-Based AutoHotkey array representing all the elements in the current instance. Inherited from MfListBase

ToString()

Gets a string representation of the object elements. Inherited from MfListBase

VerifyIsInstance([ClassName, LineFile, LineNumber, Source])

Verifies the the current object is set to an instance. Inherited from MfObject.

VerifyIsNotInstance([MethodName, LineFile, LineNumber, Source])

Verifies the the current object is NOT set to an instance. Used in Static methods. Inherited from MfObject.

Example

mfLst := new MfList()
i := 0
iEnd := 10
While, (i < iEnd)
{
   if (Mod(i, 2)) ; only odd numbers
   {
       mss := new MfString()
       mss.Value := MfString.Format("String Value: '{0}'", i)
       mfLst.Add(mss)
   }
   else
   {
       msi := new MfInteger(i)
       mfLst.Add(msi)
   }
   i++
}

mfsOutput := new MfString()
mfiOutput := new MfInteger()

For i, var in mfLst
{
   if (MfObject.IsObjInstance(var, MfString))
   {
       mfsOutput.AppendLine(var)
   }
   else if (MfObject.IsObjInstance(var, MfInteger))
   {
       mfiOutput.Add(var)
   }
}

MsgBox, 64, Text, % mfsOutput.Value
MsgBox, 64, Total, % mfiOutput.ToString()