Hello,
In C/C++ you can have functions with default values.
From http://www.uq.net.au/~zzmiadam/tute/Basic/functions.htm
" char DefaultFunc( int A = 5 )
means that if the function is called without any parameters passed, the value for A defaults to 5, otherwise it takes on the value passed, so:
result = DefaultFunc(22) ; //A is assigned a value of 22
result = DefaultFunc() ; //value of A defaults to 5
"
Can you do the same in VB.NET?
I have a function that returns the next business day
"Function ReturnNextBusinessDay(ByVal inDate As Date) As Date"
I want the function declaration to be in such a way that inDate will have a blank default value. The function will use today's date if inDate is blank.
How can this be done?
Thank you,
Burak
In C/C++ you can have functions with default values.
From http://www.uq.net.au/~zzmiadam/tute/Basic/functions.htm
" char DefaultFunc( int A = 5 )
means that if the function is called without any parameters passed, the value for A defaults to 5, otherwise it takes on the value passed, so:
result = DefaultFunc(22) ; //A is assigned a value of 22
result = DefaultFunc() ; //value of A defaults to 5
"
Can you do the same in VB.NET?
I have a function that returns the next business day
"Function ReturnNextBusinessDay(ByVal inDate As Date) As Date"
I want the function declaration to be in such a way that inDate will have a blank default value. The function will use today's date if inDate is blank.
How can this be done?
Thank you,
Burak