Struct NullableBool

Struct NullableBool

Namespace: Aspose.Tasks
Assembly: Aspose.Tasks.dll (25.2.0)

A class for boolean values with possibility to check whether the value was defined or not.

public struct NullableBool : IEquatable<nullablebool>

Implements

IEquatable<nullablebool>

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

NullableBool(bool)

Initializes a new instance of the Aspose.Tasks.NullableBool struct with the specified boolean value.

public NullableBool(bool value)

Parameters

value bool

the specified boolean value.

NullableBool(bool, bool)

Initializes a new instance of the Aspose.Tasks.NullableBool struct.

public NullableBool(bool value, bool isDefined)

Parameters

value bool

The current value.

isDefined bool

The value indicating whether current value is defined.

Properties

IsDefined

Gets a value indicating whether the value was defined; otherwise, false.

public bool IsDefined { get; }

Property Value

bool

Value

Gets or sets a value indicating whether current value is true or false.

public bool Value { get; set; }

Property Value

bool

Methods

Equals(NullableBool)

Returns a flag indicating whether this instance is equal to the specified instance of the Aspose.Tasks.NullableBool class.

public bool Equals(NullableBool other)

Parameters

other NullableBool

the specified object to compare to this instance.

Returns

bool

a flag indicating whether this instance is equal to the specified instance of the Aspose.Tasks.NullableBool class.

Equals(object)

Returns a flag indicating whether this instance is equal to the specified object.

public override bool Equals(object obj)

Parameters

obj object

the specified object to compare to this instance.

Returns

bool

a flag indicating whether this instance is equal to the specified object.

GetHashCode()

Returns a hash code value for the instance of the Aspose.Tasks.NullableBool class.

public override int GetHashCode()

Returns

int

returns a hash code value for this object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(NullableBool, NullableBool)

Returns a value indicating whether this instance is equal to a specified object.

public static bool operator ==(NullableBool a, NullableBool b)

Parameters

a NullableBool

The first Aspose.Tasks.NullableBool.

b NullableBool

The second Aspose.Tasks.NullableBool.

Returns

bool

a value indicating whether this instance is equal to a specified object

implicit operator bool(NullableBool)

Implicitly converts a Aspose.Tasks.NullableBool instance to a boolean value. Returns true when Aspose.Tasks.NullableBool.Value is true and Aspose.Tasks.NullableBool.IsDefined is true.

public static implicit operator bool(NullableBool val)

Parameters

val NullableBool

The value to convert.

Returns

bool

a boolean value.

implicit operator NullableBool(bool)

Implicitly converts boolean value to the Aspose.Tasks.NullableBool instance.

public static implicit operator NullableBool(bool val)

Parameters

val bool

Value to convert.

Returns

NullableBool

Converted Aspose.Tasks.NullableBool instance.

operator !=(NullableBool, NullableBool)

Returns a value indicating whether this instance is not equal to a specified object.

public static bool operator !=(NullableBool a, NullableBool b)

Parameters

a NullableBool

The first Aspose.Tasks.NullableBool.

b NullableBool

The second Aspose.Tasks.NullableBool.

Returns

bool

a value indicating whether this instance is not equal to a specified object </nullablebool>