473,387 Members | 1,637 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,387 software developers and data experts.

Convert C# bitwise operators to VB - How?

Hello,

I found some code that I could use in my application on the web, but it is
written in C#, and I would like to convert it to VB. And I am having
problems with one section. Is there anyone that could tell me how to
convert these two things?

1)

[Flags, Serializable]
public enum CardType
{
MasterCard = 0x0001,
VISA = 0x0002,
Amex = 0x0004,
DinersClub = 0x0008,
enRoute = 0x0010,
Discover = 0x0020,
JCB = 0x0040,
Unknown = 0x0080,
All = CardType.Amex | CardType.DinersClub | CardType.Discover |
CardType.Discover |
CardType.enRoute | CardType.JCB | CardType.MasterCard | CardType.VISA
}
I understand how to do the ENUM, but I don't understand what the values are?
They seem like some kind of bit settings and I don't know how to do that.

2.)

if (_cardTypes & CardType.Amex)!=0)

where _cardTypes I believe contains some bitwise combination of the
CardTypes from above.....

Thanks for any help!

Jim
Nov 20 '05 #1
37 11001
Hi James,

1:

<Flags(), Serializable()> _
Public Enum CardType
MasterCard = &H1
VISA = &H2
Amex = &H4
DinersClub = &H8
enRoute = &H10
Discover = &H20
JCB = &H40
Unknown = &H80
All = MasterCard Or VISA Or Amex Or DinersClub Or enRoute Or Discover Or
JCB
End Enum

2:

If (_cardTypes And CardType.Amex) = CardType.Amex Then
' Amex is present
End If

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

"Maybe it's a game called 'Punish the User'"
"James Radke" <jr*****@wi.rr.com> wrote in message
news:ub**************@TK2MSFTNGP11.phx.gbl...
: Hello,
:
: I found some code that I could use in my application on the web, but it is
: written in C#, and I would like to convert it to VB. And I am having
: problems with one section. Is there anyone that could tell me how to
: convert these two things?
:
: 1)
:
: [Flags, Serializable]
: public enum CardType
: {
: MasterCard = 0x0001,
: VISA = 0x0002,
: Amex = 0x0004,
: DinersClub = 0x0008,
: enRoute = 0x0010,
: Discover = 0x0020,
: JCB = 0x0040,
: Unknown = 0x0080,
: All = CardType.Amex | CardType.DinersClub | CardType.Discover |
: CardType.Discover |
: CardType.enRoute | CardType.JCB | CardType.MasterCard | CardType.VISA
: }
:
:
: I understand how to do the ENUM, but I don't understand what the values
are?
: They seem like some kind of bit settings and I don't know how to do that.
:
: 2.)
:
: if (_cardTypes & CardType.Amex)!=0)
:
: where _cardTypes I believe contains some bitwise combination of the
: CardTypes from above.....
:
: Thanks for any help!
:
: Jim
:
:
Nov 20 '05 #2
Hello,

"James Radke" <jr*****@wi.rr.com> schrieb:
1)

[Flags, Serializable]
public enum CardType
{
MasterCard = 0x0001,
VISA = 0x0002,
Amex = 0x0004,
DinersClub = 0x0008,
enRoute = 0x0010,
Discover = 0x0020,
JCB = 0x0040,
Unknown = 0x0080,
All = CardType.Amex | CardType.DinersClub | CardType.Discover |
CardType.Discover |
CardType.enRoute | CardType.JCB | CardType.MasterCard | CardType.VISA
}

I understand how to do the ENUM, but I don't understand
what the values are?
They are in hexadezimal format. Use '&H1' for '0x0001', '&H2' for '0x0002'
and so on.
2.)

if (_cardTypes & CardType.Amex)!=0)

where _cardTypes I believe contains some bitwise combination
of the CardTypes from above.....


Use 'If (m_CardTypes And CardType.Amex) <> 0 Then' instead.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3
Tom,

Hmmm... So the All = in #1 below would use the 'Or' versus the 'Xor'? Does
a standard Or make ALL a unique ENUM? Or is that doing something slightly
different in VB, than in the C#?

I will try it! Thanks for the assist.......

Jim
"Tom Spink" <th**********@ntlworld.com> wrote in message
news:uW**************@TK2MSFTNGP09.phx.gbl...
Hi James,

1:

<Flags(), Serializable()> _
Public Enum CardType
MasterCard = &H1
VISA = &H2
Amex = &H4
DinersClub = &H8
enRoute = &H10
Discover = &H20
JCB = &H40
Unknown = &H80
All = MasterCard Or VISA Or Amex Or DinersClub Or enRoute Or Discover Or JCB
End Enum

2:

If (_cardTypes And CardType.Amex) = CardType.Amex Then
' Amex is present
End If

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

"Maybe it's a game called 'Punish the User'"
"James Radke" <jr*****@wi.rr.com> wrote in message
news:ub**************@TK2MSFTNGP11.phx.gbl...
: Hello,
:
: I found some code that I could use in my application on the web, but it is : written in C#, and I would like to convert it to VB. And I am having
: problems with one section. Is there anyone that could tell me how to
: convert these two things?
:
: 1)
:
: [Flags, Serializable]
: public enum CardType
: {
: MasterCard = 0x0001,
: VISA = 0x0002,
: Amex = 0x0004,
: DinersClub = 0x0008,
: enRoute = 0x0010,
: Discover = 0x0020,
: JCB = 0x0040,
: Unknown = 0x0080,
: All = CardType.Amex | CardType.DinersClub | CardType.Discover |
: CardType.Discover |
: CardType.enRoute | CardType.JCB | CardType.MasterCard | CardType.VISA
: }
:
:
: I understand how to do the ENUM, but I don't understand what the values
are?
: They seem like some kind of bit settings and I don't know how to do that. :
: 2.)
:
: if (_cardTypes & CardType.Amex)!=0)
:
: where _cardTypes I believe contains some bitwise combination of the
: CardTypes from above.....
:
: Thanks for any help!
:
: Jim
:
:

Nov 20 '05 #4
Hi James,

VB's AND is a bitwise And and OR is a bitwise Or. They are the same as
their C# counterparts.

If you come across && in some C# code, it is the same as VB's AndThen.
Similarly C#'s || is the same as VB's OrElse.

Regards,
Fergus
MVP [Windows Start button, Shutdown dialogue]
Nov 20 '05 #5
Hello,

"Fergus Cooney" <fi******@tesco.net> schrieb:
If you come across && in some C# code, it is the same as
VB's AndThen.


'AndThen'? Typo or am I missing something?

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet

Nov 20 '05 #6
Cor
Herfried,
Yes I too find these operators not nice Herfried,
In Dutch there is a proverbial: That is grist for his mill.
:-))
Cor
Nov 20 '05 #7
Hello,

"Cor" <no*@non.com> schrieb:
Yes I too find these operators not nice Herfried,
In Dutch there is a proverbial: That is grist for his mill.


'AndAlso' and 'OrElse' -- IMO very nice. I would have liked 'And' and 'Or'
as logical operators and 'BitAnd' and 'BitOr' as bitwise operators, but they
changed that in the Beta.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #8
Cor
Hi Herfried,
When the names where "BitAnd" and "BitOr" I would never argue about it.
Cor
Nov 20 '05 #9
Hello,

"Cor" <no*@non.com> schrieb:
When the names where "BitAnd" and "BitOr" I would
never argue about it.


You vote for 'Bit'x operators too?

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #10
Cor
Hi Herfried,
Of course, first of all, which VB programmer uses those really often.

We always agree that the natural language prefers, I seldom say "en ook" do
you say often "und auch" ?

That renaming bitwise operators had been a good sollution. And fits to the
theorie of natural language. Bitwise is not a part of the natural language
and for that you can create a new word.

Cor
Nov 20 '05 #11
Hello,

"Cor" <no*@non.com> schrieb:
Of course, first of all, which VB programmer uses those really
often.
The bitwise operators or the logical operators?
We always agree that the natural language prefers, I
seldom say "en ook" do you say often "und auch" ?
In German, "und" has the meaning of "und auch".
That renaming bitwise operators had been a good sollution.
And fits to the theorie of natural language. Bitwise is not
a part of the natural language and for that you can create
a new word.


That's exactly what I think.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #12
Everyone who replied,

Thanks for the assistance! After a little trial and error, everything works
great now!

Jim
"Peter Huang [MSFT]" <v-******@online.microsoft.com> wrote in message
news:O9**************@cpmsftngxa06.phx.gbl...
Hi James,
Hmmm... So the All = in #1 below would use the 'Or' versus the 'Xor'? Yes.
Does a standard Or make ALL a unique ENUM?

Yes.
The value of ALL will be &H7F in #1
Or is that doing something slightly
different in VB, than in the C#?

I think they are same in the bitwise operation.

You may check the link belwo for more information.

Used to perform a logical disjunction on two Boolean expressions, or
bitwise disjunction on two numeric values..

http://msdn.microsoft.com/library/de...us/vblr7/html/ vaopror.asp

Binary | operators are predefined for the integral types and bool. For
integral types, | computes the bitwise OR of its operands. For bool
operands, | computes the logical OR of its operands; that is, the result is false if and only if both its operands are false.
http://msdn.microsoft.com/library/de...us/csref/html/ vclrfBarOperator.asp

Dis this answer the questions?

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
Reply-To: "James Radke" <jr*****@wi.rr.com>
From: "James Radke" <jr*****@wi.rr.com>
References: <ub**************@TK2MSFTNGP11.phx.gbl>

<uW**************@TK2MSFTNGP09.phx.gbl>
Subject: Re: Convert C# bitwise operators to VB - How?
Date: Thu, 18 Sep 2003 17:02:47 -0500
Lines: 98
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <eT**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: cpe-24-167-241-101.wi.rr.com 24.167.241.101
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:139201
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Tom,

Hmmm... So the All = in #1 below would use the 'Or' versus the 'Xor'? Does
a standard Or make ALL a unique ENUM? Or is that doing something slightly
different in VB, than in the C#?

I will try it! Thanks for the assist.......

Jim
"Tom Spink" <th**********@ntlworld.com> wrote in message
news:uW**************@TK2MSFTNGP09.phx.gbl...
Hi James,

1:

<Flags(), Serializable()> _
Public Enum CardType
MasterCard = &H1
VISA = &H2
Amex = &H4
DinersClub = &H8
enRoute = &H10
Discover = &H20
JCB = &H40
Unknown = &H80
All = MasterCard Or VISA Or Amex Or DinersClub Or enRoute Or Discover
Or
JCB
End Enum

2:

If (_cardTypes And CardType.Amex) = CardType.Amex Then
' Amex is present
End If

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

"Maybe it's a game called 'Punish the User'"
"James Radke" <jr*****@wi.rr.com> wrote in message
news:ub**************@TK2MSFTNGP11.phx.gbl...
: Hello,
:
: I found some code that I could use in my application on the web, but
itis
: written in C#, and I would like to convert it to VB. And I am having
: problems with one section. Is there anyone that could tell me how to
: convert these two things?
:
: 1)
:
: [Flags, Serializable]
: public enum CardType
: {
: MasterCard = 0x0001,
: VISA = 0x0002,
: Amex = 0x0004,
: DinersClub = 0x0008,
: enRoute = 0x0010,
: Discover = 0x0020,
: JCB = 0x0040,
: Unknown = 0x0080,
: All = CardType.Amex | CardType.DinersClub | CardType.Discover |
: CardType.Discover |
: CardType.enRoute | CardType.JCB | CardType.MasterCard |

CardType.VISA : }
:
:
: I understand how to do the ENUM, but I don't understand what the

values are?
: They seem like some kind of bit settings and I don't know how to do

that.
:
: 2.)
:
: if (_cardTypes & CardType.Amex)!=0)
:
: where _cardTypes I believe contains some bitwise combination of the
: CardTypes from above.....
:
: Thanks for any help!
:
: Jim
:
:


Nov 20 '05 #13
Hi Herfried, Cor,

'AndThen' is how I think of 'AndAlso', which is somewhat awkward English
as far as my usage of it goes. Like "und auch", the also doesn't add anything
unless you're emphasising - "... and another thing...."

I would prefer BitAnd and BitOr to emphasis the bitwise nature of the
operation (and unsigned values to use it on) but changing the semantics of And
and Or would break a lot of code until the programmers writing/upgrading it
had a firm realisation of this radical change.

Ah, well,

Regards,
Fergus
Nov 20 '05 #14
Cor
Hi Fergus,
Some weeks ago I was arguing about that in the newsgroup and told that in
Dutch (translated)
"en ook" is unusual and only used to give an extra dimension to "and". But
it is in normal Dutch awkward.

Some regulars from England and the US said that it was normal used English
but I did doubt it, because in using key words, Dutch is in many ways quiet
similar to English. But they said: "no it is well used English!"

Herfried said too that it was normal in the German language, that I can
absolute not oversee because in the German language are a lot of words quiet
similar with Dutch but it is grammatical totally different. The grammatical
seems to be from the bible from Luther, what was in the language from the
people from the mountain like Herfried.

And now you come with this sentence.
'AndThen' is how I think of 'AndAlso', which is somewhat awkward English as far as my usage of it goes. Like "und auch", the also doesn't add anything unless you're emphasising - "... and another thing...."
My first characters I did type were "Fergus I love you".
:-))
I would prefer BitAnd and BitOr to emphasis the bitwise nature of the
operation (and unsigned values to use it on) but changing the semantics of And and Or would break a lot of code until the programmers writing/upgrading it had a firm realisation of this radical change.

Make sense but I think that the most VB programmers avoid using bitwise
programming. I think 95% does not know they exist and 98% not how it works.
(Only my opinion).

Gives me a good feeling that I was not arguing* with only stupid arguments.
Cor
* do I nice use this word now or again wrong?
Nov 20 '05 #15
Cor
Hi Fergus,
Some weeks ago I was arguing about that in the newsgroup and told that in
Dutch (translated)
"en ook" is unusual and only used to give an extra dimension to "and". But
it is in normal Dutch awkward.

Some regulars from England and the US said that it was normal used English
but I did doubt it, because in using key words, Dutch is in many ways quiet
similar to English. But they said: "no it is well used English!"

Herfried said too that it was normal in the German language, that I can
absolute not oversee because in the German language are a lot of words quiet
similar with Dutch but it is grammatical totally different. The grammatical
seems to be from the bible from Luther, what was in the language from the
people from the mountain like Herfried.

And now you come with this sentence.
'AndThen' is how I think of 'AndAlso', which is somewhat awkward English as far as my usage of it goes. Like "und auch", the also doesn't add anything unless you're emphasising - "... and another thing...."
My first characters I did type were "Fergus I love you".
:-))
I would prefer BitAnd and BitOr to emphasis the bitwise nature of the
operation (and unsigned values to use it on) but changing the semantics of And and Or would break a lot of code until the programmers writing/upgrading it had a firm realisation of this radical change.

Make sense but I think that the most VB programmers avoid using bitwise
programming. I think 95% does not know they exist and 98% not how it works.
(Only my opinion).

Gives me a good feeling that I was not arguing* with only stupid arguments.
Cor
* do I nice use this word now or again wrong?
Nov 20 '05 #16
An example of 'AndThen' in everyday english would be:

If you subscribe to this newsgroup and then you phrase a question politely
then someone might answer it.

An example of 'AndAlso' in everyfday english would be:

If you have a PC and (you) also have Visual Studio .NET then you tou might
like to aprticipate in this newsgroup.

--
Stephany Young
MVP (Cooking, Cleaning, Laundry, Gardening, Decryption of Husband-Speak and
Teenager-Speak)
"Cor" <no*@non.com> wrote in message
news:3f***********************@reader21.wxs.nl...
Hi Fergus,
Some weeks ago I was arguing about that in the newsgroup and told that in
Dutch (translated)
"en ook" is unusual and only used to give an extra dimension to "and". But
it is in normal Dutch awkward.

Some regulars from England and the US said that it was normal used English
but I did doubt it, because in using key words, Dutch is in many ways quiet similar to English. But they said: "no it is well used English!"

Herfried said too that it was normal in the German language, that I can
absolute not oversee because in the German language are a lot of words quiet similar with Dutch but it is grammatical totally different. The grammatical seems to be from the bible from Luther, what was in the language from the
people from the mountain like Herfried.

And now you come with this sentence.
'AndThen' is how I think of 'AndAlso', which is somewhat awkward English
as far as my usage of it goes. Like "und auch", the also doesn't add

anything
unless you're emphasising - "... and another thing...."


My first characters I did type were "Fergus I love you".
:-))
I would prefer BitAnd and BitOr to emphasis the bitwise nature of the operation (and unsigned values to use it on) but changing the semantics

of And
and Or would break a lot of code until the programmers writing/upgrading it
had a firm realisation of this radical change.

Make sense but I think that the most VB programmers avoid using bitwise
programming. I think 95% does not know they exist and 98% not how it

works. (Only my opinion).

Gives me a good feeling that I was not arguing* with only stupid arguments.

Cor
* do I nice use this word now or again wrong?

Nov 20 '05 #17
An example of 'AndThen' in everyday english would be:

If you subscribe to this newsgroup and then you phrase a question politely
then someone might answer it.

An example of 'AndAlso' in everyfday english would be:

If you have a PC and (you) also have Visual Studio .NET then you tou might
like to aprticipate in this newsgroup.

--
Stephany Young
MVP (Cooking, Cleaning, Laundry, Gardening, Decryption of Husband-Speak and
Teenager-Speak)
"Cor" <no*@non.com> wrote in message
news:3f***********************@reader21.wxs.nl...
Hi Fergus,
Some weeks ago I was arguing about that in the newsgroup and told that in
Dutch (translated)
"en ook" is unusual and only used to give an extra dimension to "and". But
it is in normal Dutch awkward.

Some regulars from England and the US said that it was normal used English
but I did doubt it, because in using key words, Dutch is in many ways quiet similar to English. But they said: "no it is well used English!"

Herfried said too that it was normal in the German language, that I can
absolute not oversee because in the German language are a lot of words quiet similar with Dutch but it is grammatical totally different. The grammatical seems to be from the bible from Luther, what was in the language from the
people from the mountain like Herfried.

And now you come with this sentence.
'AndThen' is how I think of 'AndAlso', which is somewhat awkward English
as far as my usage of it goes. Like "und auch", the also doesn't add

anything
unless you're emphasising - "... and another thing...."


My first characters I did type were "Fergus I love you".
:-))
I would prefer BitAnd and BitOr to emphasis the bitwise nature of the operation (and unsigned values to use it on) but changing the semantics

of And
and Or would break a lot of code until the programmers writing/upgrading it
had a firm realisation of this radical change.

Make sense but I think that the most VB programmers avoid using bitwise
programming. I think 95% does not know they exist and 98% not how it

works. (Only my opinion).

Gives me a good feeling that I was not arguing* with only stupid arguments.

Cor
* do I nice use this word now or again wrong?

Nov 20 '05 #18
Cor
Stephany, (checked twice now)
An example of 'AndThen' in everyday English would be:

If you subscribe to this newsgroup and then you phrase a question politely
then someone might answer it.
An example of 'AndAlso' in everyday English would be:
If you have a PC and (you) also have Visual Studio .NET then you tou might like to participate in this newsgroup.

That is the same as in Dutch (with other words for "and" and "also" and
"then", but phonetical are "and" and "then" almost the same as in English).

When you look at a thread I tried to start about a serious discussion about
AndAlso the answer were totaly oposite.

Thanks,

(Did you make those typing errors express to tickle me or was it an accident
:-)) ?)

Cor
Nov 20 '05 #19
Cor
Stephany, (checked twice now)
An example of 'AndThen' in everyday English would be:

If you subscribe to this newsgroup and then you phrase a question politely
then someone might answer it.
An example of 'AndAlso' in everyday English would be:
If you have a PC and (you) also have Visual Studio .NET then you tou might like to participate in this newsgroup.

That is the same as in Dutch (with other words for "and" and "also" and
"then", but phonetical are "and" and "then" almost the same as in English).

When you look at a thread I tried to start about a serious discussion about
AndAlso the answer were totaly oposite.

Thanks,

(Did you make those typing errors express to tickle me or was it an accident
:-)) ?)

Cor
Nov 20 '05 #20
I think I must have :)

--
Stephany Young
MVP (Cooking, Cleaning, Laundry, Gardening, Decryption of Husband-Speak and
Teenager-Speak)

"Cor" <no*@non.com> wrote in message
news:3f***********************@reader21.wxs.nl...
Stephany, (checked twice now)
An example of 'AndThen' in everyday English would be:

If you subscribe to this newsgroup and then you phrase a question politely then someone might answer it.
An example of 'AndAlso' in everyday English would be:

If you have a PC and (you) also have Visual Studio .NET then you tou

might like to participate in this newsgroup.
That is the same as in Dutch (with other words for "and" and "also" and
"then", but phonetical are "and" and "then" almost the same as in

English).
When you look at a thread I tried to start about a serious discussion about AndAlso the answer were totaly oposite.

Thanks,

(Did you make those typing errors express to tickle me or was it an accident :-)) ?)

Cor

Nov 20 '05 #21
I think I must have :)

--
Stephany Young
MVP (Cooking, Cleaning, Laundry, Gardening, Decryption of Husband-Speak and
Teenager-Speak)

"Cor" <no*@non.com> wrote in message
news:3f***********************@reader21.wxs.nl...
Stephany, (checked twice now)
An example of 'AndThen' in everyday English would be:

If you subscribe to this newsgroup and then you phrase a question politely then someone might answer it.
An example of 'AndAlso' in everyday English would be:

If you have a PC and (you) also have Visual Studio .NET then you tou

might like to participate in this newsgroup.
That is the same as in Dutch (with other words for "and" and "also" and
"then", but phonetical are "and" and "then" almost the same as in

English).
When you look at a thread I tried to start about a serious discussion about AndAlso the answer were totaly oposite.

Thanks,

(Did you make those typing errors express to tickle me or was it an accident :-)) ?)

Cor

Nov 20 '05 #22
Hello,

"Fergus Cooney" <fi******@tesco.net> schrieb:
I would prefer BitAnd and BitOr to emphasis the bitwise
nature of the operation (and unsigned values to use it on)
but changing the semantics of And and Or would break a
lot of code until the programmers writing/upgrading it
had a firm realisation of this radical change.


I think that was the main reason why they changed it back. They didn't want
to confuse the VB developers.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #23
Hello,

"Fergus Cooney" <fi******@tesco.net> schrieb:
I would prefer BitAnd and BitOr to emphasis the bitwise
nature of the operation (and unsigned values to use it on)
but changing the semantics of And and Or would break a
lot of code until the programmers writing/upgrading it
had a firm realisation of this radical change.


I think that was the main reason why they changed it back. They didn't want
to confuse the VB developers.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #24
Hello,

"Cor" <no*@non.com> schrieb:
That is the same as in Dutch (with other words for
"and" and "also" and "then", but phonetical are "and"
and "then" almost the same as in English).


In some German dialects, it's pronounced similar to the English version.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #25
Hello,

"Stephany Young" <st******@sysoft.co.nz> schrieb:
An example of 'AndThen' in everyday english would be:

If you subscribe to this newsgroup and then you phrase
a question politely then someone might answer it.
In German we would say:

Wenn du die Newsgroup abonnierst _und dann_
höflich eine Frage stellst, dann wirst du vielleicht eine
Antwort bekommen.
An example of 'AndAlso' in everyfday english would be:

If you have a PC and (you) also have Visual Studio
.NET then you tou might like to aprticipate in this
newsgroup.
In German:

Wenn du einen PC _und auch_ Visual Studio .NET hast,
dann...
Stephany Young
MVP (Cooking, Cleaning, Laundry, Gardening, Decryption
of Husband-Speak and Teenager-Speak)


:-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #26
Hello,

"Cor" <no*@non.com> schrieb:
Make sense but I think that the most VB programmers avoid
using bitwise programming.


Remember that in VB6 only bitwise 'And', 'Or', etc. operators existed.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #27
Hello,

"Cor" <no*@non.com> schrieb:
That is the same as in Dutch (with other words for
"and" and "also" and "then", but phonetical are "and"
and "then" almost the same as in English).


In some German dialects, it's pronounced similar to the English version.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #28
Hello,

"Stephany Young" <st******@sysoft.co.nz> schrieb:
An example of 'AndThen' in everyday english would be:

If you subscribe to this newsgroup and then you phrase
a question politely then someone might answer it.
In German we would say:

Wenn du die Newsgroup abonnierst _und dann_
höflich eine Frage stellst, dann wirst du vielleicht eine
Antwort bekommen.
An example of 'AndAlso' in everyfday english would be:

If you have a PC and (you) also have Visual Studio
.NET then you tou might like to aprticipate in this
newsgroup.
In German:

Wenn du einen PC _und auch_ Visual Studio .NET hast,
dann...
Stephany Young
MVP (Cooking, Cleaning, Laundry, Gardening, Decryption
of Husband-Speak and Teenager-Speak)


:-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #29
Hello,

"Cor" <no*@non.com> schrieb:
Make sense but I think that the most VB programmers avoid
using bitwise programming.


Remember that in VB6 only bitwise 'And', 'Or', etc. operators existed.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #30
Cor
> > Make sense but I think that the most VB programmers avoid
using bitwise programming.

But who knows that, I never had paid any attention to it.
Now you tell this I know why I did found the behaviour of And and Or always
so strange in VB6.
Nov 20 '05 #31
Cor
> > Make sense but I think that the most VB programmers avoid
using bitwise programming.

But who knows that, I never had paid any attention to it.
Now you tell this I know why I did found the behaviour of And and Or always
so strange in VB6.
Nov 20 '05 #32
Hi Cor,

:-))

I'm sure that you argued* your point well in that discussion against your
countrymen and also** against the English speakers.

Even when I first started using BASIC I was into bits. But then I
discovered C and moved camp.

Regards,
Fergus

* Yep, correct usage.

** Ok but still a bit awkward. I would normally use 'as well as'
Nov 20 '05 #33
Hi Stephany,

|| Stephany Young
|| MVP (Cooking, Cleaning, Laundry, Gardening,
|| Decryption of Husband-Speak and Teenager-Speak)

LOL

Regards,
Fergus
Nov 20 '05 #34
Hi Cor,

:-))

I'm sure that you argued* your point well in that discussion against your
countrymen and also** against the English speakers.

Even when I first started using BASIC I was into bits. But then I
discovered C and moved camp.

Regards,
Fergus

* Yep, correct usage.

** Ok but still a bit awkward. I would normally use 'as well as'
Nov 20 '05 #35
Hi Stephany,

|| Stephany Young
|| MVP (Cooking, Cleaning, Laundry, Gardening,
|| Decryption of Husband-Speak and Teenager-Speak)

LOL

Regards,
Fergus
Nov 20 '05 #36
Cor
Hi Fergus,

You don't believe it, for that "as well as" I was long-time searching in my
mind. I did not like it, that I always was using "too" as well as "also" in
my sentences.

Cor
Nov 20 '05 #37
Cor
Hi Fergus,

You don't believe it, for that "as well as" I was long-time searching in my
mind. I did not like it, that I always was using "too" as well as "also" in
my sentences.

Cor
Nov 20 '05 #38

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

Similar topics

9
by: Michael B. Trausch | last post by:
I have a question regarding bitwise operators, I've been trying to figure this out for about two days now, and I just can't seem to get it. What I'm trying to do is use a variable to hold a bitmask...
3
by: aiKeith | last post by:
Does someone know the equivelant to this in vb.net? c# if ( (someChar & 0xFF80 ) == 0){ // Evaluated, do something.... } How can i accomplish this in vb.net? If you could tell me and also...
4
by: Mike Hodkin | last post by:
As a beginning student of C++, books reference "bitwise operators" and give brief examples, but I have not read a good explanation of what they are used for. One reference mentioned that they are...
6
by: jas_lx | last post by:
The basic understanding of what bitwise operators (& ^ | >> << ) comes fairly simple, as long as one has a fundamental understanding of bits, bytes and binary. Having done some Win32...
2
by: Steve Summit | last post by:
-----BEGIN PGP SIGNED MESSAGE----- It's often explained that the reason for some of the imprecision in C's definition is so that C can be implemented on different kinds of machines -- say, those...
5
by: noridotjabi | last post by:
I'm learning to program in C and any tutorial or book that I read likes to briefly touch on birdies operators and then move on without giving any sort of example application of them. Call me what...
5
by: Bob Homes | last post by:
In VB6, foreground and background colors of controls had to be assigned a single number. If you knew the RGB values for the color, you still had to convert them into the single number accepatable...
2
by: Mark Rae | last post by:
Hi, This isn't *specifically* an ASP.NET question, so I've also posted it in the ADO.NET group - however, it's not too far off-topic... Imagine a SQL Server 2005 database with a table with an...
16
by: Santhosh | last post by:
Hi to all, How the individual digits of a number can be obtained using the bitwise operators alone.Is it possible to do it ? If we have n = 34 Result has to be 3,4. Thanks a billion for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.