Show / Hide Table of Contents

    Struct RealmInteger<T>

    A structure representing an integer value in the database. It offers API to increment the value, which produces correct merges during conflicts.

    Implements
    IEquatable<T>
    IComparable<RealmInteger<T>>
    IComparable<T>
    IConvertible
    IFormattable
    Namespace: Realms
    Assembly: Realm.dll
    Syntax
    public struct RealmInteger<T> : IEquatable<T>, IComparable<RealmInteger<T>>, IComparable<T>, IConvertible, IFormattable where T : struct, IComparable<T>, IFormattable
    Type Parameters
    Name Description
    T

    The integer type, represented by this RealmInteger<T>. Supported types are , , , and .

    Remarks

    RealmInteger<T> is implicitly convertible to and from T/>.
    Calling Increment() on a managed RealmObject's property must be done in a write transaction. When calling Increment() on a RealmObject property, it will increment the property's value in the database, so the change will be reflected the next time this property is accessed. If the object is unmanaged, its property value will not be affected.

    Methods

    | Improve this Doc View Source

    CompareTo(T)

    Declaration
    public int CompareTo(T other)
    Parameters
    Type Name Description
    T other
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    CompareTo(RealmInteger<T>)

    Declaration
    public int CompareTo(RealmInteger<T> other)
    Parameters
    Type Name Description
    RealmInteger<T> other
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    Decrement()

    Decrements the integer value by 1. Inverse of Increment().

    Declaration
    public RealmInteger<T> Decrement()
    Returns
    Type Description
    RealmInteger<T>

    The decremented value.

    | Improve this Doc View Source

    Equals(T)

    Declaration
    public bool Equals(T other)
    Parameters
    Type Name Description
    T other
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    Increment()

    Increments the integer value by 1. Inverse of Decrement().

    Declaration
    public RealmInteger<T> Increment()
    Returns
    Type Description
    RealmInteger<T>

    The incremented value.

    | Improve this Doc View Source

    Increment(T)

    Increment the integer value by a specified amount.

    Declaration
    public RealmInteger<T> Increment(T value)
    Parameters
    Type Name Description
    T value

    Value by which to increment.

    Returns
    Type Description
    RealmInteger<T>

    The incremented value.

    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    | Improve this Doc View Source

    ToString(String, IFormatProvider)

    Declaration
    public string ToString(string format, IFormatProvider formatProvider)
    Parameters
    Type Name Description
    String format
    IFormatProvider formatProvider
    Returns
    Type Description
    String

    Operators

    | Improve this Doc View Source

    Decrement(RealmInteger<T>)

    Declaration
    public static RealmInteger<T> operator --(RealmInteger<T> source)
    Parameters
    Type Name Description
    RealmInteger<T> source
    Returns
    Type Description
    RealmInteger<T>
    | Improve this Doc View Source

    Equality(RealmInteger<T>, RealmInteger<T>)

    Declaration
    public static bool operator ==(RealmInteger<T> first, RealmInteger<T> second)
    Parameters
    Type Name Description
    RealmInteger<T> first
    RealmInteger<T> second
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Implicit(T to RealmInteger<T>)

    Declaration
    public static implicit operator RealmInteger<T>(T i)
    Parameters
    Type Name Description
    T i
    Returns
    Type Description
    RealmInteger<T>
    | Improve this Doc View Source

    Implicit(RealmInteger<T> to T)

    Declaration
    public static implicit operator T(RealmInteger<T> i)
    Parameters
    Type Name Description
    RealmInteger<T> i
    Returns
    Type Description
    T
    | Improve this Doc View Source

    Increment(RealmInteger<T>)

    Declaration
    public static RealmInteger<T> operator ++(RealmInteger<T> source)
    Parameters
    Type Name Description
    RealmInteger<T> source
    Returns
    Type Description
    RealmInteger<T>
    | Improve this Doc View Source

    Inequality(RealmInteger<T>, RealmInteger<T>)

    Declaration
    public static bool operator !=(RealmInteger<T> first, RealmInteger<T> second)
    Parameters
    Type Name Description
    RealmInteger<T> first
    RealmInteger<T> second
    Returns
    Type Description
    Boolean

    Implements

    IEquatable<>
    IComparable<>
    IComparable<>
    IConvertible
    IFormattable

    See Also

    https://realm.io/docs/realm-object-server/#counters
    • Improve this Doc
    • View Source
    Back to top Copyright © 2017 Realm
    Generated by DocFX