Reputation: 81262
Simple yes/no question : Can I call a vb.net function compiled in a vb.net dll from a c# function compiled in its own C# dll? Running in the same application.
Upvotes: 0
Views: 296
Reputation: 1
It depends on the access modifier of the class and its method/function. Below is a list of access modifiers (C# / VB.Net) and the external availability.
public / Public - Yes
protected / Protected - Must be inherited and the subclass can be used.
internal / Private - No
protected internal / Friend - No
private / Protected Friend - No
Upvotes: 0
Reputation: 1089
The whole point of .NET is interoperability. Therefore, all .NET language assemblies should be able to call back and forth to other .NET assemblies, with a few very specific caveats, as noted by Pete.
Upvotes: 5
Reputation: 9146
Yes you can. The other way round isn't necessarily true because you can do things in C# that aren't CLS Compliant, hence the reason you need to mark C# assemblies with
[assembly:CLSCompliant(true)]
Upvotes: 13
Reputation: 8876
Yes ofcourse. You can access the dll and can create objects of classes in the dll and call methods.
Upvotes: 4