[event binding] code convert from c# to VB.NET

atmoz

Member
Joined
Jan 21, 2012
Messages
6
Programming Experience
1-3
Dear all,

I have downloaded a sample-project that looks very good. Just what I was looking for :) EXCEPT: this is in C# and I want to use it in VB.NET
Yesterday I already compiled the *.CS to a usable DLL for in VB.NET. But now I'm stuck somewhere:

In the original code there is:

VB.NET:
MediaNak mn = new MediaNak(send, pass, name, true);

 //event bindings
mn.Getmu += mn_Getmu;

and later in the code it says:

VB.NET:
    static void mn_Getmu(string send, string www, string naam, string message)
        {
            //do something with string message, etc...
        }

How do I write those 2 pieces of code correctly in VB.NET so that I can use it?

I want to start a sub (for example mn_Getmu) if mn.Getmu gets fired. In c# I think it's done by "+=" but how do I accomplish this in VB?

Thanks for helping me out!

With kind regards,

Atmoz
 
That is not correct, do as in the example in link I provided.
 
Back
Top