Search Results for

    Show / Hide Table of Contents

    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
    IEquatable<Unit>
    Inherited Members
    Object.Equals(Object, Object)
    Object.GetType()
    Object.ReferenceEquals(Object, Object)
    Namespace: System.Reactive
    Assembly: System.Reactive.Core.dll
    Syntax
    [Serializable]
    public struct Unit : IEquatable<Unit>

    Properties

    | Improve this Doc View Source

    Default

    Gets the single unit value.

    Declaration
    public static Unit Default { get; }
    Property Value
    Type Description
    Unit

    Methods

    | Improve this Doc View Source

    Equals(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
    ValueType.Equals(Object)
    | Improve this Doc View Source

    Equals(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.

    | Improve this Doc View Source

    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
    ValueType.GetHashCode()
    | Improve this Doc View Source

    ToString()

    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
    ValueType.ToString()

    Operators

    | Improve this Doc View Source

    Equality(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.

    | Improve this Doc View Source

    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.

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX