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

The specified initialization vector (IV) does not match the block size for this algorithm