Home All Groups Group Topic Archive Search About
Author
31 Mar 2005 8:27 AM
NEWBIE
hi could someone help me convert this c# code
  public event EventHandler TextChanged {
            add {
                Events.AddHandler(EventTextChanged, value);
            }
            remove {
                Events.RemoveHandler(EventTextChanged, value);
            }
        }

Author
31 Mar 2005 9:04 AM
Crouchie1998
Here's a link that Herfried supplied another user yesterday:

http://dotnet.mvps.org/dotnet/faqs/?id=languageconverters&lang=en
Author
31 Mar 2005 9:28 AM
Tom Shelton
On 2005-03-31, NEWBIE <NEW***@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]
Author
31 Mar 2005 10:07 AM
Cor Ligthert
Newbie,

You are sure this is C#?

Cor
Author
31 Mar 2005 10:37 AM
NEWBIE
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
>
>
>
Author
31 Mar 2005 10:46 AM
google_groups3
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).
Author
31 Mar 2005 11:54 AM
Cor Ligthert
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
Author
31 Mar 2005 11:23 AM
Herfried K. Wagner [MVP]
"NEWBIE" <NEW***@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/>
Author
31 Mar 2005 11:48 AM
Crouchie1998
Author
31 Mar 2005 11:56 AM
Herfried K. Wagner [MVP]
Crouchie,

"Crouchie1998" <crouchie1***@discussions.microsoft.com> schrieb:
> 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

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/>
Author
31 Mar 2005 12:01 PM
Crouchie1998
Pleasure - we are all here to help each other