By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,572 Members | 2,949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,572 IT Pros & Developers. It's quick & easy.

When to use AndAlso vs And ?

P: n/a
Greetings,

If x = y And m = n The
....
End If

If x = y AndAlso m = n Then
....
End If

When do I need to use AndAlso vs And?

Thanks,
Rich
Dec 28 '06 #1
Share this Question
Share on Google+
30 Replies


P: n/a
For the sample you provided, you are doing a strictly logical operation. Use
the "AndAlso" since it's more efficient (it doesn't evaluate the second
operand if the first is false).
The "And" operator is usually just used for bitwise operations. You can
also use "And" for logical operations, but it evaluates both operands always.
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
Instant Python: VB to Python converter
"Rich" wrote:
Greetings,

If x = y And m = n The
...
End If

If x = y AndAlso m = n Then
...
End If

When do I need to use AndAlso vs And?

Thanks,
Rich
Dec 28 '06 #2

P: n/a
If you use "And", then it processes all of the clauses and then decides
if it's true or not.
So it checks both (x=y) and (m=n).

If you use "AndAlso", it stops processing when it hits a condition that
is false. So if (x=y)
is false, it never checks (m=n). This is more efficient because it
doesn't do
unnecessary processing, and also can be handy, if you want to do
something like this:

If (rdr IsNot Nothing) AndAlso rdr.Rows(0).Items(0).ToString = "abc" ...

Unlike VB6, it won't crap out if rdr is nothing, because it won't
process the
second clause.

For the "or" operator, they added "OrElse" which does the same thing.
It's called short-circuiting.

I believe this is the way "and" and "or" work in C/C++/C#. I think they
would
have just changed "and" and "or" in VB, but it would have freaked out
too many
people and required more work when converting from VB6, so they just
added
new constructs.

Robin S.
(more info than you wanted, wasn't it?)
------------------------------

"Rich" <Ri**@discussions.microsoft.comwrote in message
news:82**********************************@microsof t.com...
Greetings,

If x = y And m = n The
...
End If

If x = y AndAlso m = n Then
...
End If

When do I need to use AndAlso vs And?

Thanks,
Rich

Dec 28 '06 #3

P: n/a
what a load of crap it worked well enough in VB6

unnecessary change isn't good.
it's unnecessary

-Aaron
RobinS wrote:
If you use "And", then it processes all of the clauses and then decides
if it's true or not.
So it checks both (x=y) and (m=n).

If you use "AndAlso", it stops processing when it hits a condition that
is false. So if (x=y)
is false, it never checks (m=n). This is more efficient because it
doesn't do
unnecessary processing, and also can be handy, if you want to do
something like this:

If (rdr IsNot Nothing) AndAlso rdr.Rows(0).Items(0).ToString = "abc" ...

Unlike VB6, it won't crap out if rdr is nothing, because it won't
process the
second clause.

For the "or" operator, they added "OrElse" which does the same thing.
It's called short-circuiting.

I believe this is the way "and" and "or" work in C/C++/C#. I think they
would
have just changed "and" and "or" in VB, but it would have freaked out
too many
people and required more work when converting from VB6, so they just
added
new constructs.

Robin S.
(more info than you wanted, wasn't it?)
------------------------------

"Rich" <Ri**@discussions.microsoft.comwrote in message
news:82**********************************@microsof t.com...
Greetings,

If x = y And m = n The
...
End If

If x = y AndAlso m = n Then
...
End If

When do I need to use AndAlso vs And?

Thanks,
Rich
Dec 28 '06 #4

P: n/a
aa*********@gmail.com wrote:
what a load of crap it worked well enough in VB6
Really? How would VB6 handle this code if the instance were null?

If (Not obj Is Nothing) And (obj.Property = "something") Then
'Do something here
End If

It would have crashed because IIRC, And was not short circuited in VB6
.. Using AndAlso avoids this in VB.Net.
>
unnecessary change isn't good.
it's unnecessary
The original VB.Net beta proposed adding two new operators called
BitAnd and BitOr which would be used for bitwise operations and
changing And and Or to only be logical operations. That would have
been an unnecessary change and, thankfully, they changed it back.
>

"Rich" <Ri**@discussions.microsoft.comwrote in message
>
When do I need to use AndAlso vs And?
Dec 28 '06 #5

P: n/a
Rich wrote:
>
When do I need to use AndAlso vs And?
RobinS explained how those keywords work so I won't repeat that
information. My recommendation is to ALWAYS use AndAlso and OrElse
when doing logical comparisons. It costs you nothing to use them and
you get the benefits of short circuiting.

Use And and Or for bitwise operations.

The exception being if you are reusing code from VB6 and it might not
be worth the time to change the And's and Or's to AndAlso and OrElse.

Chris

Dec 28 '06 #6

P: n/a
and you seriously can't find a workaround for that?

I'd wrap it in a function and be done with it. lol
shit can you seriously not figure out the logic here?

Public Function DoSomething(obj as object) as boolean
on error resume next

If obj.property <"something"
DoSomething = False
Else
DoSomething = True
end select

End function

Chris Dunaway wrote:
aa*********@gmail.com wrote:
what a load of crap it worked well enough in VB6

Really? How would VB6 handle this code if the instance were null?

If (Not obj Is Nothing) And (obj.Property = "something") Then
'Do something here
End If

It would have crashed because IIRC, And was not short circuited in VB6
. Using AndAlso avoids this in VB.Net.

unnecessary change isn't good.
it's unnecessary

The original VB.Net beta proposed adding two new operators called
BitAnd and BitOr which would be used for bitwise operations and
changing And and Or to only be logical operations. That would have
been an unnecessary change and, thankfully, they changed it back.
>
"Rich" <Ri**@discussions.microsoft.comwrote in message

When do I need to use AndAlso vs And?
Dec 28 '06 #7

P: n/a
you still don't understand the point.

unnecessary change isn't good.

it is unnecessary

-Aaron
Chris Dunaway wrote:
aa*********@gmail.com wrote:
what a load of crap it worked well enough in VB6

Really? How would VB6 handle this code if the instance were null?

If (Not obj Is Nothing) And (obj.Property = "something") Then
'Do something here
End If

It would have crashed because IIRC, And was not short circuited in VB6
. Using AndAlso avoids this in VB.Net.

unnecessary change isn't good.
it's unnecessary

The original VB.Net beta proposed adding two new operators called
BitAnd and BitOr which would be used for bitwise operations and
changing And and Or to only be logical operations. That would have
been an unnecessary change and, thankfully, they changed it back.
>
"Rich" <Ri**@discussions.microsoft.comwrote in message

When do I need to use AndAlso vs And?
Dec 28 '06 #8

P: n/a
While I concur with the 'use AndAlso and OrElse when doing logical
comparisons' rule of thumb, as usual there are always exceptions to the
rule.

One such exception is the situation where one has 2 functions where both
return a boolean, both execute some code that is critical to the application
and the result of both must be True for some other action to be taken, e.g.:

Private Sub Form_Load(...) Handles MyBase.Load

If FunctionA() And FunctionB() Then
' Take some critical action before continuing
End If

End Sub

Private Function FunctionA() As Boolean

Try
' Some critical code here
Return True
Catch
Return False
End Try

End Function

Private Function FunctionB() As Boolean

Try
' Some other critical code here
Return True
Catch
Return False
End Try

End Function

If AndAlso was used in this case, and FunctionA returned False then
FunctionB would not be called and a critical step would be 'missed'.

I am not advocation that this is a good way to go about things, merely that
it demonstrates a situation where 'short-circuiting' is not desirable.
"Chris Dunaway" <du******@gmail.comwrote in message
news:11**********************@n51g2000cwc.googlegr oups.com...
Rich wrote:
>>
When do I need to use AndAlso vs And?

RobinS explained how those keywords work so I won't repeat that
information. My recommendation is to ALWAYS use AndAlso and OrElse
when doing logical comparisons. It costs you nothing to use them and
you get the benefits of short circuiting.

Use And and Or for bitwise operations.

The exception being if you are reusing code from VB6 and it might not
be worth the time to change the And's and Or's to AndAlso and OrElse.

Chris

Dec 28 '06 #9

P: n/a
what a load of crap it worked well enough in VB6

unnecessary change isn't good.
it's unnecessary


Stephany Young wrote:
While I concur with the 'use AndAlso and OrElse when doing logical
comparisons' rule of thumb, as usual there are always exceptions to the
rule.

One such exception is the situation where one has 2 functions where both
return a boolean, both execute some code that is critical to the application
and the result of both must be True for some other action to be taken, e.g.:

Private Sub Form_Load(...) Handles MyBase.Load

If FunctionA() And FunctionB() Then
' Take some critical action before continuing
End If

End Sub

Private Function FunctionA() As Boolean

Try
' Some critical code here
Return True
Catch
Return False
End Try

End Function

Private Function FunctionB() As Boolean

Try
' Some other critical code here
Return True
Catch
Return False
End Try

End Function

If AndAlso was used in this case, and FunctionA returned False then
FunctionB would not be called and a critical step would be 'missed'.

I am not advocation that this is a good way to go about things, merely that
it demonstrates a situation where 'short-circuiting' is not desirable.
"Chris Dunaway" <du******@gmail.comwrote in message
news:11**********************@n51g2000cwc.googlegr oups.com...
Rich wrote:
>
When do I need to use AndAlso vs And?
RobinS explained how those keywords work so I won't repeat that
information. My recommendation is to ALWAYS use AndAlso and OrElse
when doing logical comparisons. It costs you nothing to use them and
you get the benefits of short circuiting.

Use And and Or for bitwise operations.

The exception being if you are reusing code from VB6 and it might not
be worth the time to change the And's and Or's to AndAlso and OrElse.

Chris
Dec 28 '06 #10

P: n/a
aa*********@gmail.com wrote:
you still don't understand the point.

unnecessary change isn't good.

it is unnecessary
I do understand the point, and I agree that unnecessary change isn't
good.

And and Or STILL function like they did before!!

Nothing has changed, a feature has been ADDED.

Chris

Dec 28 '06 #11

P: n/a

aa*********@gmail.com wrote:
what a load of crap it worked well enough in VB6

unnecessary change isn't good.
it's unnecessary
Ok so maybe change just for the sake of change is sometimes a Bad
Thing, but I don't see a problem with having short-ciruit logic
operators. It's not as if they are the ONLY logic operator, you can
still use "And" and "Or".

Dec 28 '06 #12

P: n/a
it's not a feature.. it's a point of confusion

VB.net has NO TANGIBLE BENEFITS over VB6.
the IDE sucks; it is slower it is more difficult; it doesn't produce
portable code.

I used to be able to write VB6 code, cut and paste it into Notepad and
run it as a VBS file.

When VB.net comes 90% close to being able to have this sort of
simplicity- is when I lower myself to using VB 2005.

and the point of the matter is that it's not called VB.net 2005; it is
merely called VB 2005.

Why are we posting in a newsgroup named DOTNET when we're not talking
about a product named DOTNET?

why are there 40 dead newsgroups at microsoft.public.vb?

why did they bother changing the newsgroup name?

-Aaron
Chris Dunaway wrote:
aa*********@gmail.com wrote:
you still don't understand the point.

unnecessary change isn't good.

it is unnecessary

I do understand the point, and I agree that unnecessary change isn't
good.

And and Or STILL function like they did before!!

Nothing has changed, a feature has been ADDED.

Chris
Dec 28 '06 #13

P: n/a
But Chris,

If you use logic in this way, he can't continue to rail against the machine,
tossing his little tantrums because he needs to change his way of thinking
and coding

Bruce

"Chris Dunaway" <du******@gmail.comwrote in message
news:11*********************@73g2000cwn.googlegrou ps.com...
aa*********@gmail.com wrote:
>you still don't understand the point.

unnecessary change isn't good.

it is unnecessary

I do understand the point, and I agree that unnecessary change isn't
good.

And and Or STILL function like they did before!!

Nothing has changed, a feature has been ADDED.

Chris

Dec 29 '06 #14

P: n/a
mg

aa*********@gmail.com wrote:
what a load of crap it worked well enough in VB6

unnecessary change isn't good.
it's unnecessary
yawn. If this is the limits of your contribution, don't bother MB.

Dec 29 '06 #15

P: n/a
I don't need to change my way of coding.

I'll stay happy, wellpaid in the database world and say screw
programming

-Aaron
Bruce W. Darby wrote:
But Chris,

If you use logic in this way, he can't continue to rail against the machine,
tossing his little tantrums because he needs to change his way of thinking
and coding

Bruce

"Chris Dunaway" <du******@gmail.comwrote in message
news:11*********************@73g2000cwn.googlegrou ps.com...
aa*********@gmail.com wrote:
you still don't understand the point.

unnecessary change isn't good.

it is unnecessary
I do understand the point, and I agree that unnecessary change isn't
good.

And and Or STILL function like they did before!!

Nothing has changed, a feature has been ADDED.

Chris
Dec 30 '06 #16

P: n/a
aa*********@gmail.com wrote:
it's not a feature.. it's a point of confusion

VB.net has NO TANGIBLE BENEFITS over VB6.
the IDE sucks; it is slower it is more difficult; it doesn't produce
portable code.

I used to be able to write VB6 code, cut and paste it into Notepad and
run it as a VBS file.

When VB.net comes 90% close to being able to have this sort of
simplicity- is when I lower myself to using VB 2005.

and the point of the matter is that it's not called VB.net 2005; it is
merely called VB 2005.

Why are we posting in a newsgroup named DOTNET when we're not talking
about a product named DOTNET?

why are there 40 dead newsgroups at microsoft.public.vb?

why did they bother changing the newsgroup name?

-Aaron
Chris Dunaway wrote:
aa*********@gmail.com wrote:
you still don't understand the point.
>
unnecessary change isn't good.
>
it is unnecessary
I do understand the point, and I agree that unnecessary change isn't
good.

And and Or STILL function like they did before!!

Nothing has changed, a feature has been ADDED.

Chris
VB.NET allows more use of operating system functions than VB6.
A pitfall in VBS is that malicious people use it to wreak havoc on your
system.
Because of this, a lot of OS's prompt you before they run the script.
This gets pretty annoying sometimes.
Also, there are more IDE's out there than just the one Microsoft has
created.
there is a good one at icsharpcode.net It is called SharpDevelop. It
was written entirely of C#.NET code.
It can be used to write VBNET C++NET & C#NET.

mediocrevbprogrammer.freed

Dec 30 '06 #18

P: n/a
why do i need to?

shit works fine already

why fix what isn't broken?
their IDE is too slow, execution is too slow.

introducing new functionality isn't required.
quicker, easier deployments are required.

it would have been really nice to be able to make standalone EXE files
with VB 2005.
I was really hoping that they were going to stop the madness.

For starters, there isnt' even a single standard way for me to
determine which version of the framework is registered on the current
version of windows.

real quick-- my 7 machines; how do i determine which versions of the
framework I _PROBABLY_ have installed on these 7 machines? keep in
mind that it is 3 different operating systems :)

and a few different service packs.

GAME02 - WIndows XP SP2
GAME03 - Windows XP SP2
DC1 - Dualie Athlon Server 2003 SP0
PDC - Quad Pentium Pro 333mhz, Server 2000 SP4
FILE01 - Windows 2000 Professional Barebone SP4
FILE02 - Vista SP0
SQL1 - Athlon 1333 Server 2003 SP0
SQL8 - Quad Windows NT Server SP6
IIS01 - Pentium 2 400 mhz Server 2003 Web Edition SP1
IIS02 - Dualie 733 mhz Server 2000 SP4

I probably have 20 different IDE throughout these

Seriously.... please describe to me.. how I can determine 'which
version of the framework is on which machine' because I
guaran-friggin-tee it that your solution will be incomplete and _wrong_

Yeah-- if every WIndows machine in the world had the .NET framework;
life would be simple.

But working for a large corporation; asking them to install the .NET
framework on an old Server 2000 machine? A Server that's been stable
for 4 years without problems?

You think that they will just gamble on letting some rogue Windows
Administrator install the framework?

Yes; if Microsoft could guarantee that the 3.0 framework will work
FLAWLESSLY with all previous versions-- then everything would be all
fine and good if they would just push 3.0 framework onto everything
from Windows 95 to NT4 to Windows 2000, 2003, XP and VIsta?

But am I really ready to take yet another FORCED UPGRADE WITHOUT REAL
TANGIBLE ROI BENEFITS?

There has _NEVER_ been a single .NET development project with a
positive ROI

complete and utter failures

VB6 development is faster, deployment is easier.

-Aaron
Moayad Mardini wrote:
Take a look at :
http://msdn2.microsoft.com/en-us/lib...fz(VS.80).aspx
http://msdn2.microsoft.com/en-us/lib...8a(VS.80).aspx
http://blogs.msdn.com/vbfaq/archive/...20/116591.aspx
--
Moayad Mardini,
MSDN Forums Moderator
"unknown" wrote:
Dec 30 '06 #19

P: n/a
What about AndNotAlsoProvided?

George

Chris Dunaway wrote:
Rich wrote:

When do I need to use AndAlso vs And?

RobinS explained how those keywords work so I won't repeat that
information. My recommendation is to ALWAYS use AndAlso and OrElse
when doing logical comparisons. It costs you nothing to use them and
you get the benefits of short circuiting.

Use And and Or for bitwise operations.

The exception being if you are reusing code from VB6 and it might not
be worth the time to change the And's and Or's to AndAlso and OrElse.

Chris
Dec 31 '06 #20

P: n/a
aa*********@gmail.com wrote:
<snip>
real quick-- my 7 machines; how do i determine which versions of the
framework I _PROBABLY_ have installed on these 7 machines? keep in
mind that it is 3 different operating systems :)
<snip>

I'm not fortunate enough to have even 3 machines, let alone 7, but I
can just navigate to C:\WINDOWS\Microsoft.NET\Framework and sure there
it is:

09/11/2006 00:20 <DIR .
09/11/2006 00:20 <DIR ..
05/11/2006 02:07 <DIR v1.0.3705
05/11/2006 04:33 <DIR v1.1.4322
13/12/2006 23:04 <DIR v2.0.50727

Is there something that I am missing? I mean, in good old VB.Classic
days I had much more trouble finding what was the installed version of
ADO and what I had to download to keep it current (I must say that I
didn't use ADO much, so when I did use it the dificulty synchronizing
the deployment machine(s) was significant -- or so I recall).

Regards,

Branco.

Dec 31 '06 #21

P: n/a
wrong answer buck-o

I've got several dual-boot machines

-Aaron
Branco Medeiros wrote:
aa*********@gmail.com wrote:
<snip>
real quick-- my 7 machines; how do i determine which versions of the
framework I _PROBABLY_ have installed on these 7 machines? keep in
mind that it is 3 different operating systems :)
<snip>

I'm not fortunate enough to have even 3 machines, let alone 7, but I
can just navigate to C:\WINDOWS\Microsoft.NET\Framework and sure there
it is:

09/11/2006 00:20 <DIR .
09/11/2006 00:20 <DIR ..
05/11/2006 02:07 <DIR v1.0.3705
05/11/2006 04:33 <DIR v1.1.4322
13/12/2006 23:04 <DIR v2.0.50727

Is there something that I am missing? I mean, in good old VB.Classic
days I had much more trouble finding what was the installed version of
ADO and what I had to download to keep it current (I must say that I
didn't use ADO much, so when I did use it the dificulty synchronizing
the deployment machine(s) was significant -- or so I recall).

Regards,

Branco.
Jan 1 '07 #22

P: n/a
in the good old days.. did it even fucking matter what version of ADO
you were using?

Seriously

2000 shipped with 2.5 and XP shipped with 2.6 right?

other machines all had 2.1 with the release of IE4.. right?

you are missing something; you got your head on backwards

-Aaron
Branco Medeiros wrote:
aa*********@gmail.com wrote:
<snip>
real quick-- my 7 machines; how do i determine which versions of the
framework I _PROBABLY_ have installed on these 7 machines? keep in
mind that it is 3 different operating systems :)
<snip>

I'm not fortunate enough to have even 3 machines, let alone 7, but I
can just navigate to C:\WINDOWS\Microsoft.NET\Framework and sure there
it is:

09/11/2006 00:20 <DIR .
09/11/2006 00:20 <DIR ..
05/11/2006 02:07 <DIR v1.0.3705
05/11/2006 04:33 <DIR v1.1.4322
13/12/2006 23:04 <DIR v2.0.50727

Is there something that I am missing? I mean, in good old VB.Classic
days I had much more trouble finding what was the installed version of
ADO and what I had to download to keep it current (I must say that I
didn't use ADO much, so when I did use it the dificulty synchronizing
the deployment machine(s) was significant -- or so I recall).

Regards,

Branco.
Jan 1 '07 #23

P: n/a
aa*********@gmail.com wrote:
<snip>
I've got several dual-boot machines
<snip>

Forgive my ignorance, but how does this inffluence anything in finding
the installed version(s) of the .Net framework?

Regards,

Branco.

Jan 1 '07 #24

P: n/a
aa*********@gmail.com wrote:
in the good old days.. did it even fucking matter what version of ADO
you were using?
<snip>

That's exactly my point...

Regards,

Branco.

Jan 1 '07 #25

P: n/a
Unless you have a desired side effect of all parts of the expression getting
performed reguardless so that a function gets called.

However,

This sort of "side effect" programming, is questionable at best and can be
harder to debug for others. Usually it's best to short circuit.

This is a great addition to VB and I use it alot.
I used to have to jump some whoops to use AND because each item would get
evaluated reguardless.

For example:

If not objectX is nothing AND objectX.method=something then

This would blow up if objectX was nothing, because it would always try to
hit part two of the condition.

The same thing written like:
If not objectX is nothing ANDALSO objectX.method=something then

would have no problem because if objectX is nothing then it would stop
before trying to access a method/property on it.

-Shane
<ge************@yahoo.com.sgwrote in message
news:11**********************@k21g2000cwa.googlegr oups.com...
What about AndNotAlsoProvided?

George

Chris Dunaway wrote:
>Rich wrote:
>
When do I need to use AndAlso vs And?

RobinS explained how those keywords work so I won't repeat that
information. My recommendation is to ALWAYS use AndAlso and OrElse
when doing logical comparisons. It costs you nothing to use them and
you get the benefits of short circuiting.

Use And and Or for bitwise operations.

The exception being if you are reusing code from VB6 and it might not
be worth the time to change the And's and Or's to AndAlso and OrElse.

Chris

Jan 2 '07 #26

P: n/a
because C:\Program Files or C:\Windows doesn't point to the correct
instance

the point of the matter is that there is not a simple way to determine
the current version of .NET framework on any of these 8 machines.

THUS, .NET deployment is absolutely, prohibitively-- unreasonable.

If every single machine in the world had .NET 3.0 then everything might
peachy-- if it didn't run soooooo goddamn slow.

but as it is; they're never going to make 3.0 run on Windows 2000 so
they can eat a dick sandwich

there is a better place; it is called PHP, MS killed VB, sorry guys

-Aaron
Branco Medeiros wrote:
aa*********@gmail.com wrote:
<snip>
I've got several dual-boot machines
<snip>

Forgive my ignorance, but how does this inffluence anything in finding
the installed version(s) of the .Net framework?

Regards,

Branco.
Jan 2 '07 #27

P: n/a
I don't have a desired side effect.

shit worked fine in the past.

unnecessary change is not GOOD. it is not WANTED. it is not
ACCEPTABLE.

-Aaron

sstory wrote:
Unless you have a desired side effect of all parts of the expression getting
performed reguardless so that a function gets called.

However,

This sort of "side effect" programming, is questionable at best and can be
harder to debug for others. Usually it's best to short circuit.

This is a great addition to VB and I use it alot.
I used to have to jump some whoops to use AND because each item would get
evaluated reguardless.

For example:

If not objectX is nothing AND objectX.method=something then

This would blow up if objectX was nothing, because it would always try to
hit part two of the condition.

The same thing written like:
If not objectX is nothing ANDALSO objectX.method=something then

would have no problem because if objectX is nothing then it would stop
before trying to access a method/property on it.

-Shane
<ge************@yahoo.com.sgwrote in message
news:11**********************@k21g2000cwa.googlegr oups.com...
What about AndNotAlsoProvided?

George

Chris Dunaway wrote:
Rich wrote:


When do I need to use AndAlso vs And?


RobinS explained how those keywords work so I won't repeat that
information. My recommendation is to ALWAYS use AndAlso and OrElse
when doing logical comparisons. It costs you nothing to use them and
you get the benefits of short circuiting.

Use And and Or for bitwise operations.

The exception being if you are reusing code from VB6 and it might not
be worth the time to change the And's and Or's to AndAlso and OrElse.

Chris
Jan 2 '07 #28

P: n/a

aa*********@gmail.com wrote:
because C:\Program Files or C:\Windows doesn't point to the correct
instance
<snip>

I stand corrected: the simplest way to check the installed .Net
frameworks is to navigate to %windir%\microsoft.net\framework.

Regards,

Branco.

Jan 3 '07 #29

P: n/a
does the windir variable work on Windows 98?

-Aaron
Branco Medeiros wrote:
aa*********@gmail.com wrote:
because C:\Program Files or C:\Windows doesn't point to the correct
instance
<snip>

I stand corrected: the simplest way to check the installed .Net
frameworks is to navigate to %windir%\microsoft.net\framework.

Regards,

Branco.
Jan 3 '07 #30

P: n/a

aa*********@gmail.com wrote:
does the windir variable work on Windows 98?
<snip>

Yes.

B.

Jan 4 '07 #31

This discussion thread is closed

Replies have been disabled for this discussion.