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

A quick tutorial for OWASP ZAP tool for beginners

ionic2 cordova build android - Unable resolve gradle 2.2.3