logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct SaveSlotId

    Identifies a single game-save slot by its zero-based index. Immutable value object that supports equality comparison and hashing.

    Implements
    IEquatable<SaveSlotId>
    Inherited Members
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Serenity.GameSave.Domain.ValueObjects
    Assembly: Serenity.GameSave.Domain.dll
    Syntax
    public readonly struct SaveSlotId : IEquatable<SaveSlotId>

    Constructors

    SaveSlotId(int)

    Creates a new SaveSlotId.

    Declaration
    public SaveSlotId(int value)
    Parameters
    Type Name Description
    int value

    The zero-based slot index. Cannot be negative.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when value is negative.

    Fields

    Value

    The zero-based slot index.

    Declaration
    public readonly int Value
    Field Value
    Type Description
    int

    Methods

    Equals(SaveSlotId)

    Declaration
    public bool Equals(SaveSlotId other)
    Parameters
    Type Name Description
    SaveSlotId other
    Returns
    Type Description
    bool

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    ValueType.Equals(object)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ValueType.GetHashCode()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    ValueType.ToString()

    Operators

    operator ==(SaveSlotId, SaveSlotId)

    Declaration
    public static bool operator ==(SaveSlotId left, SaveSlotId right)
    Parameters
    Type Name Description
    SaveSlotId left
    SaveSlotId right
    Returns
    Type Description
    bool

    operator !=(SaveSlotId, SaveSlotId)

    Declaration
    public static bool operator !=(SaveSlotId left, SaveSlotId right)
    Parameters
    Type Name Description
    SaveSlotId left
    SaveSlotId right
    Returns
    Type Description
    bool

    Implements

    IEquatable<T>
    In this article
    © 2026 Serenity. All Rights Reserved