csharp return two variables of different types

Code Example - csharp return two variables of different types

                
                        (string, string, int) LookupName(long id) // tuple return type
{
    ... // retrieve first, middle and myNum from data storage
    return (first, middle, myNum); // tuple literal
}
                    
                
 

csharp method returns multiple values

                        
                                public Tuple<int, int> GetMultipleValue()
{
     return Tuple.Create(1,2);
}
                            
                        
 

csharp return two values

                        
                                public void getValues( out int i, out int j)
{
  i = // output 1;
  j = // output 2;
}