473,809 Members | 2,610 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1082

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

Similar topics

42
9755
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 tool. Back when I took my Java and C++ classes (two or three years ago), the available tools -- at least the ones I could find -- were still not as easy, not as "drag-and-drop", as Visual Basic. Has that changed? Is there some software out...
14
3425
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 my PC it will, for extended periods of time, consume 100% of the CPU cycles(usually with no internet activity). I've been in touch with the program's author, but this problem doesn't happen on his system.
6
2658
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 splitting up the XML into several XML documents (perhaps 50,000 per document) to be more efficient but this will make things a lot more complex because the searching needs to go accross all 500,000 records. Can anyone point me to some best practices...
9
6285
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 can i make a fast Right Trim Function in c,using Binary search kind of fast algorithm ? Offcourse...I can use the classical approach too. like : Start from the right most charecter of the string to the left of the
6
5993
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
1647
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 is not now a paid position -- I am not yet even out of K-12), and there a lot of things I love about it. I can look past a number of misfeatures in Perl, but I am surprised to see that Python has very few (that I know of). Most of them are...
3
8241
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 pulled it out of get snapshot for all on {dbname}) Total buffer pool read time (milliseconds) = 45660639 Total buffer pool write time (milliseconds)= 42128058 Total elapsed asynchronous read time = 33856320
52
2552
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 pre-order customers between 5 to 10 days later, meaning if ordered it on Amazon or Borders (or any other online store), it should be with you before the end of May. A few weeks after that it should start appearing in books stores, at least bookstores...
5
1843
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 anymore Its something like <?php
126
4433
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 theoretical framework for analyzing C programs. In contrast to other books where the actual technical difficulties are "abstracted away", this books tries to analyze real C programs taking into account pointers, stack frames, etc.
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10387
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7662
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.