Friday, February 14, 2020

Using the var keyword with C# 7.0 tuple deconstruction.

Following up on this, this...

private (int numby, string descript) GetLucky()
{
   int thirteen = 13;
   string meaning = "luck!";
   return (thirteen, meaning);
}

 
 

May be sucked on like this:

var (numby, descript) = GetLucky();

No comments:

Post a Comment