Skip to content

Commit 8f565ce

Browse files
authored
Fix equality operator in getInput1 function example (#7542)
1 parent 77a0810 commit 8f565ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/c-sharp/concepts/conditionals/conditionals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Is this condition true ? Run this if yes : Run this if no;
127127
In the example below, the condition that is checked is if `input1` is equal to 10. If that condition is true, it returns the first string. Otherwise, it returns the second string:
128128

129129
```cs
130-
string getInput1(int input1) => input1 === 10 ? "I returned true" : "I returned false";
130+
string getInput1(int input1) => input1 == 10 ? "I returned true" : "I returned false";
131131

132132
Console.WriteLine(getInput1(10)); // Output: "I returned true"
133133
Console.WriteLine(getInput1(5)); // Output: "I returned false"

0 commit comments

Comments
 (0)