Another month as a judge in Microsoft TechNet Guru Awards under Visual C# category. The TechNet Guru Awards celebrate the technical articles on Microsoft TechNet.
Post in WikiNinjas Official Blog,
Happy Coding.Regards,
Jaliya
static void Main(string[] args)
{
List<int> numbers = new List<int>() { 1, 2, 3, 4, 5 };
var values = GetValues(numbers);
Console.WriteLine($"min:{values.Item1}, max:{values.Item2}, sum:{values.Item3}");
}
static Tuple<int, int, int> GetValues(List<int> numbers)
{
return new Tuple<int, int, int>(numbers.Min(), numbers.Max(), numbers.Sum());
}
static void Main(string[] args)
{
List<int> numbers = new List<int>() { 1, 2, 3, 4, 5 };
var values = GetValues(numbers);
Console.WriteLine($"min:{values.min}, max:{values.max}, sum:{values.sum}");
}
static (int min, int max, int sum) GetValues(List<int> numbers)
{
return (numbers.Min(), numbers.Max(), numbers.Sum());
}
static (int, int, int) GetValues(List<int> numbers)
{
return (numbers.Min(), numbers.Max(), numbers.Sum());
}
static (int min, int max, int sum) GetValues(List<int> numbers)
{
return (min: numbers.Min(), max: numbers.Max(), sum: numbers.Sum());
}
var (_min, _max, _sum) = GetValues(numbers);
(var _min, var _max, var _sum) = GetValues(numbers);