Advertisement
jsauto

ReadOnly

Apr 1st, 2013
1,492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.34 KB | None | 0 0
  1. Class employee
  2.     ' Only code inside class employee can change the value of hireDateValue.
  3.     Private hireDateValue As Date
  4.     ' Any code that can access class employee can read property dateHired.
  5.     Public ReadOnly Property dateHired() As Date
  6.         Get
  7.             Return hireDateValue
  8.         End Get
  9.     End Property
  10. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement