Sriman <Sriman@discussions.microsoft.com>'s wild thoughts
were released on Tue, 30 Oct 2007 05:28:33 -0700 bearing the
following fruit:
[quoted text, click to view] >Thanks for the replay.
>Yes, I want to call C#.Net functions(Overloaded methods) from vb6 components.
VB6 is not going to be able to cope with overloaded methods
so you will either have to live with VB6 treating them as
seperate methods or change your .Net code to no longer use
overloaded methods. Neither of which really help you with
your desire for optional parameters.
I would probably just have my VB6 program pass all
parameters (passing empty string etc as needed for the
optional items) and have my .Net code cater for this.
J
[quoted text, click to view] >Thanks in advance
>Regards,
>Sriman
>
>"Jan Hyde (VB MVP)" wrote:
>
>> Sriman <Sriman@discussions.microsoft.com>'s wild thoughts
>> were released on Mon, 29 Oct 2007 15:01:01 -0700 bearing the
>> following fruit:
>>
>> >We are migrating the vb6 projects(few components, rest in vb6 only) to C#.Net
>> >2005.
>> >In this migration process we are facing one big issue with optional
>> >parameter. Actually in C#.Net there is not optional parameter concept . For
>> >that C# introduced 2 concepts like 1)overloading 2)params .
>> >But problem is
>> >1) I am not able to see access 0these overloading methods in vb6(for eg:
>> >NewUser(string a), NewUser(string a, string b)). In vb6 its showing the
>> >method name like(NewUser and NewUser_1)
>>
>> That's correct because VB6 doesn't understand overloading
>> methods.
>>
>> >2)If i use Params string[] concept: Not able to access/ see this in vb6.
>> >giving error like vb6 doesn't support this method.
>> >
>> >I Would appreciate if any one helps in solving this issue.
>>
>> I'm not really sure what your issue is.
>>
>> Is it just that you want to call a dotnet function from VB6
>> and you want an optional argument?
>>
>>
>>
>>
>> --
>> Jan Hyde
>>
>>
https://mvp.support.microsoft.com/profile/Jan.Hyde
>>
--
Jan Hyde