+ 1
What is property?
Is Name and name are same thing ?
4 Antworten
+ 3
Name and name are different, look that Name has a N and name has a n
+ 3
Its not same things. Actualy, its two different ones. First "name" is private property. second "Name" is public get/set method.
+ 2
No they are different but property have same name as private field. the only difference is that it starts with a capital letter
0
Name and name are different, C# is case sensitive.
but
property name and method name are different too.
property name is like a variable of the class.
method name() is like a function of the class.
C# accept the same name , but execute properties and method on diferentes ways. method has a block of comands inside. example "return=some_value;"
N and n in this case does not make difference. Capital in first letter is a good way of write codes.