code_junkie

Using Me (VB.NET) keyword is it required or not?

Nov 13th, 2011
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Private theString As String
  2.  
  3. Private Sub Setup(ByVal theString As String)
  4. Me.theString = theString
  5. End Sub
  6.  
  7. Public Class ExampleClass
  8.  
  9. Private FirstName As String
  10.  
  11. Public Sub ExampleMethod()
  12. Dim FirstName As String
  13. FirstName = "Stefan"
  14. End Sub
  15.  
  16. End Class
  17.  
  18. Public Class ExampleClass
  19.  
  20. Private FirstName As String
  21.  
  22. Public Sub ExampleMethod()
  23. Dim FirstName As String
  24. FirstName = "Stefan"
  25. Me.FirstName = "Carl Gustav"
  26. End Sub
  27.  
  28. End Class
  29.  
  30. Class Sample
  31. Private myString as String
  32.  
  33. Public Property GetMyString As String
  34. Get
  35. ' Some code here which sets the string after reading value from the database
  36. End Get
  37. Set
  38. End Set
  39.  
  40. End Property
  41. End Class
Add Comment
Please, Sign In to add comment