Struct Unit
Represents a type with a single value. This type is often used to denote the successful completion of a void-returning method (C#) or a Sub procedure (Visual Basic).
Implements
Inherited Members
Namespace: System.Reactive
Assembly: System.Reactive.Core.dll
Syntax
[Serializable]
public struct Unit : IEquatable<Unit>
Properties
| Improve this Doc View SourceDefault
Gets the single unit value.
Declaration
public static Unit Default { get; }
Property Value
Type | Description |
---|---|
Unit |
Methods
| Improve this Doc View SourceEquals(Object)
Determines whether the specified System.Object is equal to the current Unit.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The System.Object to compare with the current Unit. |
Returns
Type | Description |
---|---|
Boolean | true if the specified System.Object is a Unit value; otherwise, false. |
Overrides
| Improve this Doc View SourceEquals(Unit)
Determines whether the specified Unit values is equal to the current Unit. Because Unit has a single value, this always returns true.
Declaration
public bool Equals(Unit other)
Parameters
Type | Name | Description |
---|---|---|
Unit | other | An object to compare to the current Unit value. |
Returns
Type | Description |
---|---|
Boolean | Because Unit has a single value, this always returns true. |
GetHashCode()
Returns the hash code for the current Unit value.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for the current Unit value. |
Overrides
| Improve this Doc View SourceToString()
Returns a string representation of the current Unit value.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | String representation of the current Unit value. |
Overrides
Operators
| Improve this Doc View SourceEquality(Unit, Unit)
Determines whether the two specified Unit values are equal. Because Unit has a single value, this always returns true.
Declaration
public static bool operator ==(Unit first, Unit second)
Parameters
Type | Name | Description |
---|---|---|
Unit | first | The first Unit value to compare. |
Unit | second | The second Unit value to compare. |
Returns
Type | Description |
---|---|
Boolean | Because Unit has a single value, this always returns true. |
Inequality(Unit, Unit)
Determines whether the two specified Unit values are not equal. Because Unit has a single value, this always returns false.
Declaration
public static bool operator !=(Unit first, Unit second)
Parameters
Type | Name | Description |
---|---|---|
Unit | first | The first Unit value to compare. |
Unit | second | The second Unit value to compare. |
Returns
Type | Description |
---|---|
Boolean | Because Unit has a single value, this always returns false. |