Introduction
As you know Microsoft .NET is designed with cross-language interoperability. In other words, two. NET-compliant languages can interoperate with each other. Which simply means a function in VB .NET can be called by C# and vice-versa. Let's understand this practically and consider a scenario where a C# class library (.dll) is being used by the VB .NET client (.exe).
Create a C# Class Library project
- If not already, promote Class 1 to be public.
- Create functions as shown in Figure 1-1 below.
- Compile the code, to have a .dll successfully produced in the bin\debug folder.

Figure 1-1. C# Class Library having similar functions in different casing
In this example, I have declared three functions that differ in the casing of the letters used to form the name of the function (in other words Sum, sUm, and SUM). This is possible considering we are working with a case-sensitive language of choice, C#.
The following describes the consumption of that in C#. Create .dll in a VB .NET client application as in the following.
- Create a VB .NET Console Application.
- Add a reference to ClassLibrary.dll that we created in C#
- Add an Imports Class Library.Class1 in the VB .NET code file, as shown in the image below
- Create an object of the class library as in the following
Dim obj As New ClassLibrary.Class1

Figure 1-2. VB .NET Console application consuming C# Class library
But I don't see my C# functions in VB. NET.
Figure 1-2 doesn't show our C# functions Sum, sUm, and SUM that we created as shown in Figure 1-1. There is a problem and that is a genuine issue. Let's understand this.
If you observe the C# is fully capable of declaring functions that differ only by case, VB .NET is completely incapable of recognizing this case difference (due to its case in-sensitivity). This is the reason that we don't see those C# functions in VB. NET.
I understand the problem, now what is the fix?
The fix for this problem is to follow the common Language Specification (CLS). The CLS needs to be followed by another language that won't be able to recognize and understand.
For example, class members that differ in case and UInt and so on are not considered CLS Compliant. Let's enforce the CLS compliance in C#, so the case-sensitive nature can't be misused to break interoperability with clients like VB .NET or similar .NET compliant language(s).





Sr KarthigaPosted May 6, 2016, 9:19 PM
good one sir
Manish Kumar ChoudharyPosted Nov 27, 2014, 5:26 AM
nice one Vidya Vrat Agarwal sir..
Vithal WadjePosted Nov 27, 2014, 2:10 AM
nice explantion
Jeetendra GundPosted Nov 27, 2014, 1:50 AM
Good one,Thanks for sharing sir