Original Post
I have no idea how to use these, or even what they are used for exactly.
I have a million books, all of which I've looked at, I looked at a bunch of YT tutorials, still don't understand
As far as I understand, Fields are like, variables specific to a class or something.
And Properties are sort of like methods. The Get/Set accessor things have me scratching my head as well.
Basically, can someone explain to me in the most basic way, how to use Fields, and how to use Properties with the Get/Set accessors?
As for Encapsulation, all I know is that it's a way of keeping data hidden within a class. Only problem is, what is it used for exactly? I'm not sure what encapsulations purpose is.
Sorry in advance if some of these questions aren't worded good/the questions overall are silly, I am just about to head to bed.
I have a million books, all of which I've looked at, I looked at a bunch of YT tutorials, still don't understand
As far as I understand, Fields are like, variables specific to a class or something.
And Properties are sort of like methods. The Get/Set accessor things have me scratching my head as well.
Basically, can someone explain to me in the most basic way, how to use Fields, and how to use Properties with the Get/Set accessors?
As for Encapsulation, all I know is that it's a way of keeping data hidden within a class. Only problem is, what is it used for exactly? I'm not sure what encapsulations purpose is.
Sorry in advance if some of these questions aren't worded good/the questions overall are silly, I am just about to head to bed.
