Guest User

Untitled

a guest
Feb 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. namespace test
  2. {
  3.     class Data
  4.     {
  5.         private int someValue = 123;
  6.         public int SomeValue { get; set; }
  7.  
  8.         public void SetValue()
  9.         {
  10.             Console.Write("Enter a value: ");
  11.             SomeValue = Convert.ToInt32(Console.ReadLine());
  12.         }
  13.         public void DisplayValue()
  14.         {
  15.             Console.WriteLine("The private value is " + someValue);
  16.         }
  17.     }
  18. }
Add Comment
Please, Sign In to add comment