code_junkie

Question: VB.net coding standard regarding declaring variable

Nov 12th, 2011
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. print("dim _Foo as string");
  2.  
  3. Private Dim m_Foo As String
  4.  
  5. Private Dim _Foo As String
  6.  
  7. Dim Foo As String
  8.  
  9. Dim l_Foo As String
  10.  
  11. Public Class Bar
  12. Private m_firstName As String
  13.  
  14. Public Sub New(ByVal firstName As String)
  15. m_firstName = firstName
  16. End Sub
  17.  
  18. Public Function SayGreeting() As String
  19. Dim l_Greeting As String
  20. l_Greeting = String.Format("{0}, {1}!", "Hello", m_firstName)
  21. Return l_Greeting
  22. End Function
  23. End Class
  24.  
  25. _member //Class member - Camel Case
  26. intLocalVariable //note use of Hungarian notation - Camel Case
  27. pMethodParameter //Camel Case
  28. MyProperty //Pascal Case
Add Comment
Please, Sign In to add comment