Reputation: 155
I am new to programming. Using C# & ASP.Net, how would I differentiate between a property & a method? How can I tell if something is a property or a method?
Upvotes: 0
Views: 335
Reputation: 57902
Another approach (i.e. not using intellisense) is to call the method/property and compile your code. If you've used the wrong syntax the compiler will let you know.
Upvotes: 0
Reputation: 116867
Method calls have to be called with parenthesis, where not with Properties
Upvotes: 1
Reputation: 422026
Visual Studio displays different icons in the IntelliSense list. It's mentioned in the documentation too:
Visual Studio IntelliSense list http://img1.myimg.de/intellisense88c76.png
You don't use parenthesis to access properties but you always do when you're calling methods.
Upvotes: 3