✅ Difference between property, method and fields.
Hello guys, I know there is a difference between method and fields, with method representing an "action" while the field an "attribute" of an object. But what about property? I know that when we declare a new class for e.g, their is something called as the "automatically implemented properties"; I know that these are setters and getters implemented using simple line of codes.
Then I encountered this phrase:
This is where I got a bit confuse; I notice the word "properties" is being used. So anytime I came across this word, how to think of this term? Why is it important/useful? Why not simply stick to fields and methods?
Then I encountered this phrase:
The properties of an exception object can be accessed within the catch block. For example, you can use the Message property to inform the application user of an issue.This is where I got a bit confuse; I notice the word "properties" is being used. So anytime I came across this word, how to think of this term? Why is it important/useful? Why not simply stick to fields and methods?
