Skip to content
Loading
  • 0
    you can use the new included Tuples syntax.
      
    (string, string, string) LookupName(long id) // tuple return type
    {
    ... // retrieve first, middle and last from data storage
    return (first, middle, last); // tuple literal
    }
    which could then be used like this:
      
    var names = LookupName(id);
    WriteLine($"found {names.Item1} {names.Item3}.");
     
    http://csharp.net-informations.com/collection/tuple.htm
    0