Table of Contents

MutableTuple<T1> Class

Definition

Namespace
Cuemon
Assemblies
Cuemon.Core.dll
Source
src/Cuemon.Core/MutableTuple.cs

Represents a MutableTuple with a single generic value.

public class MutableTuple<T1> : MutableTuple

Type Parameters

T1

The type of the first parameter of this MutableTuple.

Inheritance
MutableTuple<T1>
Derived
Inherited Members

Examples

The following example shows how to create a single-argument MutableTuple<T> and access its value. It demonstrates both reading and updating the Arg1 property.

using System;
using Cuemon;

namespace MyApp.Data;

public class MutableTupleExample
{
    public void Demonstrate()
    {
        var tuple = new MutableTuple<string>("example");
        Console.WriteLine(tuple.Arg1); // "example"

        tuple.Arg1 = "updated";
        Console.WriteLine(tuple.Arg1); // "updated"
    }
}

Constructors

Name Description
MutableTuple(T1)

Initializes a new instance of the MutableTuple<T1> class.

Properties

Name Description
Arg1

Gets or sets the first parameter of this instance.

IsEmpty

Gets a value indicating whether this MutableTuple is empty.

Methods

Name Description
Clone()

Creates a shallow copy of the current MutableTuple object.

ToArray()

Returns an array of objects that represent the arguments passed to this instance.