Home All Groups Group Topic Archive Search About

Some question about Inherits and opreaters

Author
6 Feb 2006 9:35 PM
Husam
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

Author
6 Feb 2006 9:59 PM
Chris
Husam wrote:
Show quoteHide quote
> 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.
Author
6 Feb 2006 10:13 PM
Herfried K. Wagner [MVP]
"Husam" <Hu***@discussions.microsoft.com> schrieb:
> 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.

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