0

I have been coding last few months. Perhaps 7 months and I became flexible with basic things like , string manipulation, I/O , types , variables and so on....

In my project I used global variables always and I saw people uses property and stays away from global variables..

I don't see a point to use property get;set;

In my project I have a method executor and methods are been selected depending upon param and method type which I provide...

I read the data in to global var and then do execution by switch case ....I have scopes so I don't face any issue of variable override or any sort of issue like that..

But I see established projects has lots of property usage. Why they use? Also is the property value set is available in whole class that holds property ?

Thanks

  • 1
    Welcome to SO. In it's current form this question is too broad for the Q+A format of this site. Please read through the help center, specifically [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) It sounds like you are new to "object oriented" programming so suggest you read some articles/books around the topic to give yourself a better understanding. – Chris Pickford Oct 15 '18 at 12:05
  • It's difficult to offer general advice here. If you're writing small, relatively self-contained programs, there may not be much benefit to be realised yet; I don't think the linked dupe is particularly good for answering what you've asked here but agree with Chris that it's too broad as it currently stands. – Damien_The_Unbeliever Oct 15 '18 at 12:14

1 Answers1

0

In fact we use classes to realize business entities and all the materials we have are for this target; properties are same as characteristics of an object. In your opinion, you violate the principles of the Clean Code and OOP I think you should focus more on OOP.