Have you tried passing a null? or an empty string? You can also use reflection to find the default parameter value and pass that in.
On Fri, 4 Mar 2005 11:47:56 -0500, Falls, Travis D (HTSC, CASD) <[EMAIL PROTECTED]> wrote: > > It dies on that because it is looking for type String not object. Man I > hate optional parameters. (I know most VB'ers love'm) They really make cross > language stuff hard. > > Travis D. Falls |Consultant, RAFT.Net IT | 860.547.4070 | > [EMAIL PROTECTED] > > -----Original Message----- > From: Dean Fiala [mailto:[EMAIL PROTECTED] > Sent: Friday, March 04, 2005 11:35 AM > To: [email protected] > Subject: Re: [AspNetAnyQuestionIsOk] Type.Missing > > Try it without the casting. You can't cast nothing into something. > > RAFT_Common.InitProcess("FileWatcher", Constants.Missing, > true, false, Constants.Missing, > Constants.Missing, Constants.Missing, > Constants.Missing, Constants.Missing); > > On Fri, 4 Mar 2005 10:38:28 -0500, Falls, Travis D (HTSC, CASD) > <[EMAIL PROTECTED]> wrote: > > > > RAFT_Common.InitProcess("FileWatcher", (string)Constants.Missing, > > true, false, (string)Constants.Missing, > > (bool)Constants.Missing, (bool)Constants.Missing, > > (string)Constants.Missing, (bool)Constants.Missing); > > > > I am trying to use a VB.Net class that has optional parameters (I hate > them > > now) that are not of type object; they are specified as strings and bools. > > I get the following error though when I try the above code: > > > > System.InvalidCastException any thoughts? > > > > Travis D. Falls |Consultant, RAFT.Net IT | 860.547.4070 | > > [EMAIL PROTECTED] > > > > ************************************************************************* > > PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is > > for the exclusive use of addressee and may contain proprietary, > > confidential and/or privileged information. If you are not the intended > > recipient, any use, copying, disclosure, dissemination or distribution is > > strictly prohibited. If you are not the intended recipient, please notify > > the sender immediately by return e-mail, delete this communication and > > destroy all copies. > > ************************************************************************* > > > > > > Yahoo! Groups Links > > > > > > > > > > > > -- > Dean Fiala > Very Practical Software, Inc > http://www.vpsw.com > > Yahoo! Groups Links > > > Yahoo! Groups Links > > > > > -- Dean Fiala Very Practical Software, Inc http://www.vpsw.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
