MfByte

Namespace ›› System ››
Parent Previous Next

MfByte Class

(Inherits from MfPrimitive)

Represents Unsigned Byte object

Links

Fields, Properties, Methods, Example

Constructors


Name

Description

Constructor([val, retunAsObj, readonly])

Initializes a new instance of the MfByte class optionally setting the Value property, ReturnAsObject property and the Readonly property.

Fields


Name

Description

MaxValue

Gets the largest possible value of an MfByte.

MinValue

Gets the smallest possible value of an MfByte.

Properties


Name

Description

ReadOnly

Gets the if the derived class will allow the underlying value to be altered after the constructor has been called. Inherited from MfPrimitive.

ReturnAsObject

Gets or sets the if the MfByte class will return objects as their return value for various functions. Inherited from MfPrimitive

Value

Gets or sets the value associated with the this instance. Overrides MfPrimitive.Value.

Methods


Name

Description

Add(value)

Adds MfByte value to current instance of MfByte.

CompareTo(obj)

Compares this instance to a specified MfByte object. Overrides MfObject.CompareTo()

Divide(value)

Divides the current instance of MfByte by the divisor value.

Equals(value)

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

GetHashCode()

Gets A hash code for the current MfByte instance. Overrides MfObject.GetHashCode()

GetType()

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

GetTypeCode()

Get an enumeration value of MfTypeCode the represents MfByte Type Code.

GetValue(Obj)

Gets the byte number from Object or var containing byte. Overrides MfPrimitive.GetValue()

GetValue(Obj, Default)

Gets a byte number from Obj or returns Default value if Obj is unable to be converted to byte. Default must be a value that can be converted to byte or it will be ignored if Obj can not be converted to byte and an error will be thrown. Overrides MfPrimitive.GetValue()

GetValue(Obj, Default, AllowAny)

Gets a byte var from Obj or returns Default value if Obj is unable to be converted to byte..Default can be something other then a number or byte if AllowAny is true. Overrides MfPrimitive.GetValue()

GreaterThen(value)

Compares the current MfByte object to a specified MfByte object and returns an indication of their relative values.

GreaterThenOrEqual(value)

Compares the current MfByte object to a specified MfByte object and returns an indication of their relative values.

LessThen(value)

Compares the current MfByte object to a specified MfByte object and returns an indication of their relative values.

LessThenOrEqual(value)

Compares the current MfByte object to a specified MfByte object and returns an indication of their relative values.

Multiply(value)

Multiplies the current instance of MfByte by the value.

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.

MemberwiseClone()

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

Parse(s)

Converts the s representation of a number to its MfByte equivalent

Parse(s, style)

Converts the s representation of a number to its MfByte equivalent

Parse(s, provider)

Converts the s representation of a number to its MfByte equivalent

Parse(s, style, provider)

Converts the s representation of a number to its MfByte equivalent

Subtract(value)

Subtracts Byte value from current instance of MfByte.

ToString()

Gets a string representation of the Value of the object. Overrides MfPrimitive.ToString()

TryParse(ByRef result, s)

Tries to converts the s representation of a number to its MfByte equivalent. A return value indicates whether the conversion succeeded.

TryParse(ByRef result, s, style[, provider ])

Tries to converts the s representation of a number to its MfByte equivalent. A return value indicates whether the conversion succeeded.

Example

mfsMsg := new MfString()
mfsMsg.Value := MfString.Format("Please enter a value between {0} and {1}", MfByte.MinValue, MfByte.MaxValue)

UserInput := Mfunc.InputBox("Byte Value", mfsMsg, , 300, 140)
if (ErrorLevel)
{
   MsgBox, CANCEL was pressed.
}
else
{
   try
   {
       bValue := new MfByte(MfByte.GetValue(UserInput))
       MsgBox, 64, Value, % MfString.Format("You entered a value of {0}", bValue)
   }
   catch
   {
       MsgBox, 16, Bad Input, The input was not acceptable.
   }
}