MfSByte

Namespace ›› System ››
Parent Previous Next

MfSByte Class

(Inherits from MfPrimitive)

Represents Signed Byte object

Links

Fields, Properties, Methods, Example

Constructors


Name

Description

Constructor([val, retunAsObj, readonly])

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

Fields


Name

Description

MaxValue

Gets the largest possible value of an MfSByte. This field is constant.

MinValue

Gets the smallest possible value of an MfSByte. This field is constant.

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 MfSByte 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 MfSByte.

CompareTo(obj)

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

Divide(value)

Divides the current instance of MfSByte 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 MfSByte 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 MfSByte 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 not boolean if AllowAny is true. Overrides MfPrimitive.GetValue()

GreaterThen(value)

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

GreaterThenOrEqual(value)

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

LessThen(value)

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

LessThenOrEqual(value)

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

Multiply(value)

Multiplies the current instance of MfSByte 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 MfSByte equivalent

Parse(s, style)

Converts the s representation of a number to its MfSByte equivalent

Parse(s, provider)

Converts the s representation of a number to its MfSByte equivalent

Parse(s, style, provider)

Converts the s representation of a number to its MfSByte equivalent

Subtract(value)

Subtracts Byte value from current instance of MfSByte.

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 MfSByte 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 MfSByte equivalent. A return value indicates whether the conversion succeeded.

Since

Version 0.4

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 MfSByte(MfSByte.GetValue(UserInput))
       MsgBox, 64, Value, % MfString.Format("You entered a value of {0}", bValue)
   }
   catch
   {
       MsgBox, 16, Bad Input, The input was not acceptable.
   }
}