how do i make that in c#?
Printable View
how do i make that in c#?
as far as i am aware of this feature its not available...
but there is a better way
overload the function
private void func1(int blah)
{
}
private void func1()
{
}
bah ..
function overloading is much better of course
optional parameters are for wussies
imagine i have a function with 100 lines(well it has only 4 but it could have more :D) and i want 2paramenters to be optional..then i'd instead of having 100 lines of code have 300 lines..its a bit much no? lol
private void func1(int blah)
{
My200LinesoCode(blah)
}
private void func1()
{
My200LinesofCode(0)
}
private void My200LinesofCode(int blahblah)
{
}
This is how I get around it. In the second overload just call your real code and pass whatever you wanted the optional default value to be. Hope this helps.
tks ive already though of that
"Well Heeelllooo Mr Fancy Pants!"
:D
. . .
Sorry, I rented the Movie "Army Of Darkness" that day and have been spewing out cheesey lines from it all weekend. :)
uuuuuuu im scared