Is there a need for multiple return parameters in c#/.net?
public string, string GetFirstNameAndLastName(int id)
{
var person = from p in People
where p.Id = id
select p;
return(p.FirstName, p.LastName);
}
Usage:
public void Main(string[] args)
{
string firstName, lastName;
(firstName, lastName) = GetFirstNameAndLastName(1);
Console.WriteLine(firstName + ", " + lastName);
}