(Inherits from MfPrimitive)
Represents Boolean object for handling true and false values.
Fields, Properties, Methods, Example
Name |
Description |
|
Initializes a new instance of the MfBool class optionally setting the Value property, ReturnAsObject property and Readonly Property. |
Name |
Description |
|
Get a var of representing False. |
||
Get a string var representing False |
||
Gets a var value representing True |
||
Get a string var representing True. |
Name |
Description |
|
Gets a new instances of MfBool with its Value property set to False. |
||
Gets if the Value associated with the this instance of MfBool is false. |
||
Gets if the Value associated with the this instance of MfBool is true. |
||
Gets the if the derived class will allow the underlying value to be altered after the constructor has been called. Inherited from MfPrimitive |
||
Gets or sets the if the class will return objects as their return value for various functions |
||
Gets a new instances of MfBool with its Value property set to True. |
||
Gets or sets the value associated with the class. Overrides MfPrimitive.Value. |
Name |
Description |
|
Compares this instance to a specified MfBool object. Overrides MfObject.CompareTo() |
||
Gets if this instance Value is the same as the value. Overrides MfObject.Equals() |
||
Gets A hash code for the current MfBool. Overrides MfObject.GetHashCode() |
||
Gets the Type for the for the Class .Inherited from MfObject. |
||
Gets the boolean var from Object or var containing boolean. Overrides MfPrimitive.GetValue() |
||
Gets a boolean var from Obj or returns Default value if Obj is unable to be converted to boolean. Default must be a value that can be converted to boolean or it will be ignored if Obj can not be converted to boolean and an error will be thrown. Overrides MfPrimitive.GetValue() |
||
Gets a boolean var from Obj or returns Default value if Obj is unable to be converted to boolean.Default can be not boolean if AllowAny is true. Overrides MfPrimitive.GetValue() |
||
Gets if current instance of MfBool is of the same type as ObjType or derived from ObjType. Overrides MfObject.Is(). |
||
Get if the current class is an instance. Inherited from MfObject. |
||
Creates a shallow copy of the current MfObject instance. Inherited from MfObject. |
||
Converts the specified string representation of a logical value to its Boolean equivalent, or throws an exception if the string is not equal to the value of TrueString or FalseString. |
||
Gets a string representation of the Value of the object. Overrides MfPrimitive.ToString() |
||
Tries to convert the specified string representation of a logical value to its Boolean equivalent. A return value indicates whether the conversion succeeded or failed. |
UserInput := Mfunc.InputBox("Question!", "Programming is cool (true or false)", , 300, 140)
if (ErrorLevel)
{
MsgBox, CANCEL was pressed.
}
else
{
try
{
bValue := new MfBool(MfBool.GetValue(UserInput))
if (bValue.IsTrue)
{
MsgBox, 64, Agreed, I agree!
}
else
{
MsgBox, 64, Artistic!, Maybe you would enjoy something a little more artistic.
}
}
catch
{
MsgBox, 16, Bad Input, The input was not acceptable.
}
}