Programatically Find Optinal Params..?

Results 1 to 2 of 2

Thread: Programatically Find Optinal Params..?

  1. #1
    Join Date
    Dec 1969

    Default Programatically Find Optinal Params..?

    Can someone tell me how I might be able to see what optional paramaters any given function and/or routine might have..?<BR><BR>For example, let say I have the following function…<BR><BR>Function Foo(strFoo as string, Optional blnFoo as Boolean)<BR><BR>‘ do some stuff<BR><BR>End Function<BR><BR>Is there a way to look at that function through code and return “blnFoo” since it’s optional…<BR><BR>Any assistance would be great..!<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Sure...Using reflection.

    If you use reflection on your function, it&#039;s got a GetParameters method. Dump the results into a ParamterInfo() array, and then check each one to see if the IsOptional property is true.<BR><BR>More info can be found at and around: opic.asp<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts