Click here to Skip to main content
15,850,750 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Hi ,

Please find my scenario :
Private obj as objofX = new objofX
Public function Callmethod(BYval a as string, optional Byval OPtParam as string = "")

dim ds as dataset = new dataset
ds = obj.CallingProcMethod()

I have the above code, where CallingProcMethod calls a stored procedure.

Can i pass my optional parameter OPtParam in this function call as
ds = obj.CallingProcMethod(OPtParam )

Please help
Updated 29-May-13 19:03pm

1 solution

No, you can't. Because your first parameter isn't optional, so your optional parameter will be placed in that instead.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900