473,406 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Conversion

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
10 2054
Here's a link that Herfried supplied another user yesterday:

http://dotnet.mvps.org/dotnet/faqs/?...erters&lang=en
Nov 21 '05 #2
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
Newbie,

You are sure this is C#?

Cor
Nov 21 '05 #4
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
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
"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
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
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
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
Pleasure - we are all here to help each other

Nov 21 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stub | last post by:
Docs says that "The compiler does not use an explicit constructor to implement an implied conversion of types. It's purpose is reserved explicitly for construction." I put up code of three cases...
7
by: Michael Lehn | last post by:
Hi, I have a question regarding the conversion of objects. When is the conversion done by the constructor and when by the operator. My feeling tells me that the constructor is preferred. But...
16
by: TTroy | last post by:
Hello, I'm relatively new to C and have gone through more than 4 books on it. None mentioned anything about integral promotion, arithmetic conversion, value preserving and unsigned preserving. ...
11
by: Steve Gough | last post by:
Could anyone please help me to understand what is happening here? The commented line produces an error, which is what I expected given that there is no conversion defined from type double to type...
2
by: Alex Sedow | last post by:
Why explicit conversion from SomeType* to IntPtr is not ambiguous (according to standart)? Example: // System.IntPtr class IntPtr { public static explicit System.IntPtr (int); public...
3
by: Steve Richter | last post by:
here is a warning I am getting in a C++ .NET compile: c:\SrNet\jury\JuryTest.cpp(55) : warning C4927: illegal conversion; more than one user-defined conversion has been implicitly applied while...
0
by: Lou Evart | last post by:
DOCUMENT CONVERSION SERVICES Softline International (SII) operates one of the industry's largest document and data conversion service bureaus. In the past year, SII converted over a million...
0
by: dataentryoffshore | last post by:
Get a Discount up to 60% on data entry, data capture, dataentry services, large volume data processing and data conversion services through offshore facilities in India. Offshore data entry also...
21
by: REH | last post by:
It it permissible to use the constructor style cast with primitives such as "unsigned long"? One of my compilers accepts this syntax, the other does not. The failing one chokes on the fact that the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.