Some question about Inherits and opreaters

G

Guest

Hi EveryBody:

I have some question that I hope some body help me to answer it :

Q1\ How can I Inherits two class inside one class ?

Q2\ How can I convert the fowwloing code from C# to VB.Net :

public event EventHandler ReadyStateComplete {
add {
Events.AddHandler(_readyStateCompleteEvent, value);
}
remove {
Events.RemoveHandler(_readyStateCompleteEvent, value);
}
}

Q3\ What is equvelant to operater <> and operater "and" ?

Any help or redirection will be appreciated

regard's

Husam
 
C

Chris

Husam said:
Hi EveryBody:

I have some question that I hope some body help me to answer it :

Q1\ How can I Inherits two class inside one class ?

Q2\ How can I convert the fowwloing code from C# to VB.Net :

public event EventHandler ReadyStateComplete {
add {
Events.AddHandler(_readyStateCompleteEvent, value);
}
remove {
Events.RemoveHandler(_readyStateCompleteEvent, value);
}
}

Q3\ What is equvelant to operater <> and operater "and" ?

Any help or redirection will be appreciated

regard's

Husam

1. You can't, you can only implement interfaces
2. Sry, not sure on that one...
3. You can use "<>" in VB. or you can use "Not" and =
if Not A = B then
3b. There is no equvilant ? in VB. you can look at iif(..) statements,
they are the closest.
 
H

Herfried K. Wagner [MVP]

Husam said:
I have some question that I hope some body help me to answer it :

Q1\ How can I Inherits two class inside one class ?

You cannot. .NET does not support multiple inheritance on classes.
Q2\ How can I convert the fowwloing code from C# to VB.Net :

public event EventHandler ReadyStateComplete {
add {
Events.AddHandler(_readyStateCompleteEvent, value);
}
remove {
Events.RemoveHandler(_readyStateCompleteEvent, value);
}
}

Check out 'Custom Event' in VB 2005. You can even add your own
implementation for 'RaiseEvent' there which is not supported in C#.
Q3\ What is equvelant to operater <> and operater "and" ?

Both are actual VB operators.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top