c# - Multiple Methods, or parameters? -
OK, so I'm designing a square here and I have two options. I can write the same method which says an enum.
I am trying to figure out the best way to do this.
For example:
public class myClass {... Public Zero DoStuff1 () {... Content ...} Public Zero DoStuff2 () {. .. Do Stuff ...} Public Zero DoStuff3 () {... Do Stuff ...}}
OK, all makes sense, now there will be an alternate way: Public class myClass {... Public Enum Option {Option1, Option2, Option3} Public Zero DoStuff (Option Option) {... Do Stuff ...}} < / Pre>
In the case of dry, they are not so bad because the code is very internal Cakes call in any way, so it only looks to the user for it.
So why do you like it and there are some guidelines already around it?
Was it just me or am I really a smile here?
Comments
Post a Comment