most examples i find of Overloaded functions are small simple things like..
public int Add(int a, int b)
{
return a+b;
}
public int Add(int a, int b, int c)
{
return a+b+c;
}
but.. i want to do this for a bigger function (~10 lines of code) without adding a lot of additional lines... is there any possible way to do it?
I want something like this..
public void Log(string msg);
public void Log(string msg, Color foreground);
public void Log(string msg, Color foreground, Color background);
public void Log(string msg, bool showTimeStamp);
public void Log(string msg, Color foreground, bool showTimeStamp);
public void Log(string msg, Color foreground, Color background, bool showTimeStamp);
but at ~10 lines of code each, thats easily 60 lines of code..
Question
Bi0haZarD
most examples i find of Overloaded functions are small simple things like..
public int Add(int a, int b) { return a+b; } public int Add(int a, int b, int c) { return a+b+c; }but.. i want to do this for a bigger function (~10 lines of code) without adding a lot of additional lines... is there any possible way to do it?
I want something like this..
but at ~10 lines of code each, thats easily 60 lines of code..
any ideas?
Link to comment
Share on other sites
10 answers to this question
Recommended Posts