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"); |
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 Calculator { | |
double _lastResult = 0; | |
double subtract(double a, [double b]) { | |
if (b != null) { | |
_lastResult = a - b; | |
} else { | |
_lastResult -= a; | |
} | |
return _lastResult; |