Is there a version of the class Tuple whose Items properties are not readonly and can be set? [duplicate]

No, as mentioned a Tuple<> is intended to be immutable.

I use a custom Pair class if I need a mutable type that does the same thing, although in the spirit of embracing function concepts, I try not to use it.

namespace StackOverflow.Helpers
{
    public class Pair<T1, T2>
    {
        public T1 First { get; set; }
        public T2 Second { get; set; }
    }
} 

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)