|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
Optional parameters in visual basic
How do you set optional parameters in visual basic?
__________________
--Tantapants |
|
#2
|
|||
|
|||
|
Code:
Private Sub SomeSub(Optional SomeParam As Integer = 0)
' blah
End Sub
you must supply a default value for optional parameters. it must be a constant value. also optional parameter must be stated after any mandatory ones.
__________________
Programmer's Corner |
|
#3
|
|||
|
|||
|
Quote:
I use some optional parameters without providing a default value. It seems to me there is a special VB6 function that will let you know if an optional parameter was passed or not. |
|
#4
|
||||
|
||||
|
There is, it is called IsMissing()
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Optional parameters in visual basic |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|