Struct PinValue
Represents a value for a pin.
public readonly struct PinValue
- Inherited Members
Properties
High
The value of the pin is high.
public static PinValue High { get; }
Property Value
Low
The value of the pin is low.
public static PinValue Low { get; }
Property Value
Methods
Equals(PinValue)
Returns true if the other instance represents the same PinValue than this.
public bool Equals(PinValue other)
Parameters
other
PinValue
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if obj and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns "Low" for Low and "High" for High
public override string ToString()
Returns
Operators
operator ==(PinValue, PinValue)
Equality operator
public static bool operator ==(PinValue a, PinValue b)
Parameters
Returns
explicit operator bool(PinValue)
public static explicit operator bool(PinValue value)
Parameters
value
PinValuePinValue to convert
Returns
explicit operator byte(PinValue)
public static explicit operator byte(PinValue value)
Parameters
value
PinValuePinValue to convert
Returns
explicit operator int(PinValue)
public static explicit operator int(PinValue value)
Parameters
value
PinValuePinValue to convert
Returns
implicit operator PinValue(bool)
public static implicit operator PinValue(bool value)
Parameters
value
boolValue to set
Returns
implicit operator PinValue(int)
public static implicit operator PinValue(int value)
Parameters
value
intValue to set
Returns
operator !=(PinValue, PinValue)
Inequality operator
public static bool operator !=(PinValue a, PinValue b)