-
-
Save gdyrrahitis/97b4e90c313913d47e4cd2e9f2ad4585 to your computer and use it in GitHub Desktop.
This file contains 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
public int Method1() | |
{ | |
int value = 10; | |
Incrementer inc = new Incrementer(value); | |
inc.Increment(); | |
inc.Increment(); | |
return value; | |
} | |
public class Incrementer { | |
private int _value; | |
public Incrementer(int value) => _value = value; | |
public int Increment() => _value + 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment