SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- public class MyClass
- {
- private int _what;
- public int Property
- {
- get
- {
- var lol = 0;
- lol += 100500;
- return lol;
- }
- set
- {
- _what = value;
- if (_what < 100500)
- {
- _what += 100500;
- }
- }
- }
- }
- class Kek
- {
- public void SomeMethod()
- {
- var lololo = new MyClass();
- lololo.Property = 100; // вызовется код в set
- var rofl = lololo.Property; // вызовется код в get
- }
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.