By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,990 Members | 2,138 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,990 IT Pros & Developers. It's quick & easy.

Conversion

P: n/a
hi could someone help me convert this c# code
public event EventHandler TextChanged {
add {
Events.AddHandler(EventTextChanged, value);
}
remove {
Events.RemoveHandler(EventTextChanged, value);
}
}
Nov 21 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Here's a link that Herfried supplied another user yesterday:

http://dotnet.mvps.org/dotnet/faqs/?...erters&lang=en
Nov 21 '05 #2

P: n/a
On 2005-03-31, NEWBIE <NE****@discussions.microsoft.com> wrote:
hi could someone help me convert this c# code
public event EventHandler TextChanged {
add {
Events.AddHandler(EventTextChanged, value);
}
remove {
Events.RemoveHandler(EventTextChanged, value);
}
}


Hmm... I don't think this code can actually be translated into VB.NET.
VB.NET doesn't let you control the adding and removing of delegate
instances, AFIK.

--
Tom Shelton [MVP]
Nov 21 '05 #3

P: n/a
Newbie,

You are sure this is C#?

Cor
Nov 21 '05 #4

P: n/a
YES SIR THIS IS IN C#. Refer to my next new post in the same forum to know
know what this is.

"Cor Ligthert" wrote:
Newbie,

You are sure this is C#?

Cor

Nov 21 '05 #5

P: n/a
NEWBIE, you should not use Sir with Cor. It is a girls name in his
country. Although he insists that he is male he is actually female (or
gay).

Nov 21 '05 #6

P: n/a
"NEWBIE" <NE****@discussions.microsoft.com> schrieb:
hi could someone help me convert this c# code
public event EventHandler TextChanged {
add {
Events.AddHandler(EventTextChanged, value);
}
remove {
Events.RemoveHandler(EventTextChanged, value);
}
}


Currently this is not supported in VB.NET. However, similar code will be
supported in VB 2005. In the meantime just use VB.NET's 'Event' syntax and
'AddHandler'/'RemoveHandler'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #7

P: n/a
Herfried,

You might want to add these two convertors to the page you created:

http://dotnet.mvps.org/dotnet/faqs/?...erters&lang=en

VB.NET - C#:

http://www.developerfusion.com/utili...btocsharp.aspx

C# - VB.NET

http://www.developerfusion.com/utili...sharptovb.aspx

I hope this helps
Nov 21 '05 #8

P: n/a
Crouchie,

"Crouchie1998" <cr**********@discussions.microsoft.com> schrieb:
You might want to add these two convertors to the page you created:

http://dotnet.mvps.org/dotnet/faqs/?...erters&lang=en

VB.NET - C#:

http://www.developerfusion.com/utili...btocsharp.aspx

C# - VB.NET

http://www.developerfusion.com/utili...sharptovb.aspx


Thank you for making me aware of these converters -- they'll be included in
the next update of my website.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #9

P: n/a
There are always people who want to insult two nations at once.

And than they have not the courage to use there email address however sent
it anonymous.

Probably not a man, however a chicken

Cor
Nov 21 '05 #10

P: n/a
Pleasure - we are all here to help each other

Nov 21 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.