473,387 Members | 1,760 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.

Im still very concerned! 2002 bug or .Net 1.0

Please first read below ----

Its correct that I'm debugging and using VS.NET 2002
with .net ver 1.0 - If I run a release version in 2002 or
run it under VS.NET 2003 with .net ver 1.1 there is no
problem.

Is it VS.NET or the version of .Net that is the problem.
Are there any service packs to solve the problem for
VS.NET 2002.?

best regards?

-----

Within the following construction
switch (expression)
{
int i;
i = GetArgs() //return 2

case constant-expression:

if ( 2 == i )
{
//statement 1
}
else
{
//statement 2
}

break;

case constant-expression:
....
break;
}

(the switch block is nested within a try using catch
block)

I get execution of both statements!!!!. I thought I was
an experienced c++ programmer (10y+) migrating to C# but
I can't see what I'm doing wrong. If I take the code
snippet and puts it over in another project it works
fine, hence the syntax is ok. If I instead of ( 2 == i )
writes ( true ) it also works fine.

Please advise
best regards Jesper

..
Jesper Denmark wrote:
I get execution of both statements!!!!. I thought I was
an experienced c++ programmer (10y+) migrating to C#

That explains the somewhat hard to read
if (2==i)
syntax rather than the more natural (and just as safe in
C#)
if (i==2)
syntax...

but I can't see what I'm doing wrong. If I take the code
snippet and puts it over in another project it works
fine, hence the syntax is ok. If I instead of ( 2 == i )
writes ( true ) it also works fine.

My guess is that you're using VS.NET 2002 and running in
the debugger -
there are known bugs which show this kind of behaviour.
Try running it
not in the debugger and all should be well.

--
Jon Skeet -
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
..

Nov 13 '05 #1
0 1075

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

Similar topics

42
by: Steven O. | last post by:
I am seeking some kind of tool that I can use for GUI prototyping. I know how to use Visual Basic, but since a lot of software is being coded in Java or C++, I'd like to learn a Java or C++ -based...
14
by: Dave Patton | last post by:
Does anyone have any experience running Xenu Link Sleuth: http://home.snafu.de/tilman/xenulink.html version 1.2e on very large sites? I'm having problems running it against our site, in that on...
6
by: Greg | last post by:
I am working on a project that will have about 500,000 records in an XML document. This document will need to be queried with XPath, and records will need to be updated. I was thinking about...
9
by: Durgesh Sharma | last post by:
Hi All, Pleas help me .I am a starter as far as C Language is concerned . How can i Right Trim all the white spaces of a very long (2000 chars) Charecter string ( from the Right Side ) ? or how...
6
by: Harlin Seritt | last post by:
I am running the following code: import socket host = '9.9.45.103' port = 10001 conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM) conn.connect((host, port))
17
by: hanumizzle | last post by:
I have used Perl for a long time, but I am something of an experimental person and mean to try something new. Most of my 'work' with Vector Linux entails the use of Perl (a bit of a misnomer as it...
3
by: rdudejr | last post by:
Hi all, Ive got a database approx 350 GB in which Im getting very high Time waited for prefetch. This is directly out of the snapshot for the db (these are for the entire database I assume as I...
52
by: robert | last post by:
I'm very pleased to announce that Foundations of F#, the first book to be published on the F# programming, will finish its first printing run, tomorrow, Friday 25th May. It should reach any...
5
by: Guenther Sohler | last post by:
Dear Group, In the past I read something, that it is possible to print out php variables in html very fast with a simple symtax. Today I came back to php documentation, but I cannot find it...
126
by: jacob navia | last post by:
Buffer overflows are a fact of life, and, more specifically, a fact of C. All is not lost however. In the book "Value Range Analysis of C programs" Axel Simon tries to establish a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
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...

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.