tags:

views:

181

answers:

4

Hi, Hi i have a requirement where i have to use a tools API which is VB dll and i have to do some insert ,delete and update using that API. Can i use C#.net to implement these functionalities.If i use vb dll as reference and use thode API's will i face any issue ?

+1  A: 

Absolutely not, you should be able to consume it without any problems.

Zubair Ahmed
I read "Can we use C# to consume a VB dll" followed by "Absolutely not." lol :o :o
280Z28
+1  A: 

It will work without problems.

Only issue you may face are methods with optional arguments. For them you will just need to fill all parameters and not only mandatory ones.

Josip Medved
+3  A: 

If it is VB.NET DLL, and as long as it exposes only CLS-compliant types, then you will have no trouble at all.

If these are VB 6 components, as opposed to VB.NET, then you will sometimes find strangeness when dealing with some types like variants. At least that was what I experienced when doing this.

AaronLS
Even if that DLL is .net dll then also a .net framework version issue is there.VB6.0 DLL - it must be deployed using regsvr tool.
adatapost
I believe .NET 3.5 apps can consume .NET DLLs of older .NET versions, etc., and yes VB6 components use regsvr32
AaronLS
A: 

Thanks for your replies.

Jebli