From aac2b38d229713bbc0753cbd53849f64b8e08abf Mon Sep 17 00:00:00 2001 From: Wanja Kuch <53600785+wkuch@users.noreply.github.com> Date: Sat, 4 Mar 2023 10:52:50 +0100 Subject: [PATCH] Update introduction.md This is a very early concept in the c# track and a conditional operator might be confusing for a beginner as it wasn't explained before. --- concepts/tuples/introduction.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/concepts/tuples/introduction.md b/concepts/tuples/introduction.md index 64ccefd2d1..7852fe62af 100644 --- a/concepts/tuples/introduction.md +++ b/concepts/tuples/introduction.md @@ -25,9 +25,13 @@ the second `Item2`, etc. Non-default names are discussed below. vertices = (60, 60, 60); // return value -(bool, int) GetSameOrBigger(int num1, int num2) +(int, int) SumAndProduct(int x, int y) { - return (num1 == num2, num1 > num2 ? num1 : num2); + int sum = x + y; + int product = x * y; + + // return a tuple with both values + return (sum, product); } // method argument