Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace MyNamespace
- {
- class Program
- {
- static void Main()
- {
- MyClass my = new MyClass();
- my.a = 1465;
- my.a = 945;
- Console.WriteLine(my.a);
- }
- }
- class MyClass
- {
- private int myValue;
- public int a
- {
- get
- {
- return myValue;
- }
- set
- {
- if (value > 90)
- myValue = value;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement