OKIEWARDOYO

C#.NET No.8-3

Dec 5th, 2012
999
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.62 KB | None | 0 0
  1. /// <summary>
  2. /// Kita deklarasikan struct Persegi
  3. /// </summary>
  4. struct Rectangle
  5. {
  6.     private int m_width;
  7.     private int m_height;
  8.  
  9.     /// <summary>
  10.     /// kita buat properties width
  11.     /// </summary>
  12.     public int Width
  13.     {
  14.         get
  15.         {
  16.             return m_width;
  17.         }
  18.         set
  19.         {
  20.             m_width = value;
  21.         }
  22.     }
  23.  
  24.     /// <summary>
  25.     /// kita buat properties height
  26.     /// </summary>
  27.     public int Height
  28.     {
  29.         get
  30.         {
  31.             return m_height;
  32.         }
  33.         set
  34.         {
  35.             m_height = value;
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment