Last active
June 24, 2020 11:35
-
-
Save GIBZ-GIPE/62a816850b12765c113a9e9555ff347d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// 1) | |
Compare(5, 10); | |
// 2) | |
Compare("hallo", "hallo"); | |
// 3) | |
Compare(true, false); | |
// 4) | |
Compare(1.1, 1.2); | |
bool Compare(T value1, T value2) | |
{ | |
if(value1.Equals(value2)) | |
{ | |
return true; | |
} | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment