Open mariuszhermansdorfer opened 4 years ago
Thank you @mariuszhermansdorfer I appreciate it! I'll do a clean up of the code to follow the standards and follow your suggestion with private classes
You can also use:
public int Name { get => name; set => name = value; }
Takes up less space.
ons. 7. okt. 2020 11.52 skrev Esrup notifications@github.com:
Thank you @mariuszhermansdorfer https://github.com/mariuszhermansdorfer I appreciate it! I'll do a clean up of the code to follow the standards and follow your suggestion with private classes
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Esrup/Antflow/issues/2#issuecomment-704825795, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEYDLJYXNL5TNIANM2TW37LSJQ25LANCNFSM4SG7BBWA .
Bad example of me, as you'll use string for a name, but you get the point! :D
ons. 7. okt. 2020 19.55 skrev Mathias Sønderskov < sonderskovmathias@gmail.com>:
You can also use:
public int Name { get => name; set => name = value; }
Takes up less space.
ons. 7. okt. 2020 11.52 skrev Esrup notifications@github.com:
Thank you @mariuszhermansdorfer https://github.com/mariuszhermansdorfer I appreciate it! I'll do a clean up of the code to follow the standards and follow your suggestion with private classes
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Esrup/Antflow/issues/2#issuecomment-704825795, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEYDLJYXNL5TNIANM2TW37LSJQ25LANCNFSM4SG7BBWA .
Hey @Esrup, great initiative to open source the plugin!
You asked for some suggestions to your code, so here it comes :)
It is generally a good idea to make your class variables private and add some checks before changing their values. You would typically do this with getter/setter methods. Here, I have changed the
g
variable for you. Also, note the upper and lowercase naming convention. Public variables -> Uppercase, private -> lowercase