Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Last active June 19, 2019 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdyrrahitis/97b4e90c313913d47e4cd2e9f2ad4585 to your computer and use it in GitHub Desktop.
Save gdyrrahitis/97b4e90c313913d47e4cd2e9f2ad4585 to your computer and use it in GitHub Desktop.
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