GaneshParam
New member
- Joined
- Jul 4, 2005
- Messages
- 4
- Programming Experience
- 5-10
I am using "ctrl" as prefix for naming my windows controls instead of Hungarian Notation. e.g. ctrlName for Name textbox control. Is it better?
---------------------------------------
I have a Persistent Class e.g. Person.
Public Class Person
Dim _name as string
Dim _age as int
Public Property Name
...
End Property
Public Property Age
...
End Property
End Class
Now I want to use Person Class as parameter in a method. can I use the same name for Parameter as class name.
e.g.
Public Function GetPersonDetail(person as Person) as boolean
...
End Function
I use the same for defining variables within a class.
e.g.
Public Sub SetPersonDetail()
dim person as Person
msgbox (person.Name)
End Sub
Though the above codes compiles and works without any runtime errors is it the right way to develop .net if not can you suggest a better way.
Ganesh P. Thanks for your help in advance
---------------------------------------
I have a Persistent Class e.g. Person.
Public Class Person
Dim _name as string
Dim _age as int
Public Property Name
...
End Property
Public Property Age
...
End Property
End Class
Now I want to use Person Class as parameter in a method. can I use the same name for Parameter as class name.
e.g.
Public Function GetPersonDetail(person as Person) as boolean
...
End Function
I use the same for defining variables within a class.
e.g.
Public Sub SetPersonDetail()
dim person as Person
msgbox (person.Name)
End Sub
Though the above codes compiles and works without any runtime errors is it the right way to develop .net if not can you suggest a better way.
Ganesh P. Thanks for your help in advance