Weird case C#7 Tuple for .Net 4.6



If you're using .Net 4.6 or lower, you need to install

Install-Package "System.ValueTuple"
To get this to work ....

static void Main(string[] args)
{
    var x = DoSomething();
    Console.WriteLine(x.x);
}

static (int x, int y) DoSomething()
{
    return (1, 2);
}

Comments

Popular posts from this blog

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

vllm : Failed to infer device type