Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace test
- {
- class Data
- {
- private int someValue = 123;
- public int SomeValue { get; set; }
- public void SetValue()
- {
- Console.Write("Enter a value: ");
- SomeValue = Convert.ToInt32(Console.ReadLine());
- }
- public void DisplayValue()
- {
- Console.WriteLine("The private value is " + someValue);
- }
- }
- }
Add Comment
Please, Sign In to add comment