Integrating vb.net and c#

hi,
i have this methods in vb.net and i want to access them from c#
i am posting both of them...
can any one help me out

[[[[vb.net]]]]---------------------------------------------------------------------------------------------

Imports System.Management
Public Function GetSignalStrength() As String
        On Error GoTo oops

        Dim query As ManagementObjectSearcher
        Dim Qc As ManagementObjectCollection
        Dim Oq As ObjectQuery
        Dim Ms As ManagementScope
        Dim Co As ConnectionOptions
        Dim Mo As ManagementObject
        Dim outp As String
        Dim ssid As String
        Co = New ConnectionOptions
        Ms = New ManagementScope("root\wmi")
        Oq = New ObjectQuery("SELECT * FROM MSNdis_80211_ReceivedSignalStrength Where active=true")
        query = New ManagementObjectSearcher(Ms, Oq)
        Qc = query.Get
        outp = ""
        For Each Mo In query.Get
            outp = outp & Mo("Ndis80211ReceivedSignalStrength") & " "
        Next
        Return Trim(outp)
        Exit Function
oops:
        Return Err.Description
    End Function

[[[[c# code]]]]--------------------------------------------------------------------------------------------------------
using System;
using System.Net;
using System.Net.Sockets;

namespace UdpEchoServer
{
    class App
    {
        private const int ServerPortNumber = 9696;

            [STAThread]
        static void Main(string[] args)
        {
            try {
                Socket udpSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);

                        EndPoint localEP = new IPEndPoint(IPAddress.Any, ServerPortNumber);
                EndPoint remoteEP = new IPEndPoint(IPAddress.None, ServerPortNumber);
                udpSocket.Bind(localEP);

                byte [] receiveBuffer = new byte [512];
                try
                        {
                    while (true)
                              {
                        int receivedSize = udpSocket.ReceiveFrom(receiveBuffer, ref remoteEP);
                                                                                                             ***********//// i want to access the wireless signal strength method here
                        udpSocket.SendTo(receiveBuffer, receivedSize, SocketFlags.None, remoteEP);
                    }
                }
                        finally
                        {
                    udpSocket.Close();
                }
                        }
                        catch (SocketException se)
                        {
                              Console.WriteLine(se.ToString());
                        }
        }
    }
}
prashanth_gurijalaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

volkingCommented:
Create two projects in ONE solution.
Project 1 = VB.NET
Project 2 = C#

Then simply call in either direction. VB.NET and C# are totally compatible, just not in the same project. Two projects, ONE solution.
0
NipNFriar_TuckCommented:
If you compile your VB.Net code into a dll and include the dll as a reference in your C# code and use the name space that your vb code is in then you would simply instantiate the class that the function is in and execute the function on that class...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.