|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Conversionhi could someone help me convert this c# code
public event EventHandler TextChanged { add { Events.AddHandler(EventTextChanged, value); } remove { Events.RemoveHandler(EventTextChanged, value); } } Here's a link that Herfried supplied another user yesterday:
http://dotnet.mvps.org/dotnet/faqs/?id=languageconverters&lang=en On 2005-03-31, NEWBIE <NEW***@discussions.microsoft.com> wrote:
> hi could someone help me convert this c# code Hmm... I don't think this code can actually be translated into VB.NET.> public event EventHandler TextChanged { > add { > Events.AddHandler(EventTextChanged, value); > } > remove { > Events.RemoveHandler(EventTextChanged, value); > } > } VB.NET doesn't let you control the adding and removing of delegate instances, AFIK. -- Tom Shelton [MVP] YES SIR THIS IS IN C#. Refer to my next new post in the same forum to know
know what this is. Show quoteHide quote "Cor Ligthert" wrote: > Newbie, > > You are sure this is C#? > > Cor > > > 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). 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 "NEWBIE" <NEW***@discussions.microsoft.com> schrieb: Currently this is not supported in VB.NET. However, similar code will be > hi could someone help me convert this c# code > public event EventHandler TextChanged { > add { > Events.AddHandler(EventTextChanged, value); > } > remove { > Events.RemoveHandler(EventTextChanged, value); > } > } 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/> Herfried,
You might want to add these two convertors to the page you created: http://dotnet.mvps.org/dotnet/faqs/?id=languageconverters&lang=en VB.NET - C#: http://www.developerfusion.com/utilities/convertvbtocsharp.aspx C# - VB.NET http://www.developerfusion.com/utilities/convertcsharptovb.aspx I hope this helps Crouchie,
"Crouchie1998" <crouchie1***@discussions.microsoft.com> schrieb: Thank you for making me aware of these converters -- they'll be included in > You might want to add these two convertors to the page you created: > > http://dotnet.mvps.org/dotnet/faqs/?id=languageconverters&lang=en > > VB.NET - C#: > > http://www.developerfusion.com/utilities/convertvbtocsharp.aspx > > C# - VB.NET > > http://www.developerfusion.com/utilities/convertcsharptovb.aspx 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/>
Why VB.NET??
How to debug this? Line Numbers in RichTextBox.. OT: ILMerge Inherit or usercontrol Using an event defined in an interface filesystemwatcher changed vb.net How to count total number of rows in the datagrid. proposedValue contains displayMember instead of valueMember DataGrid How to delete underlying database |
|||||||||||||||||||||||