Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 15th, 2006, 12:22 PM
Registered User
Join Date: Jan 2006
Location: Mumbai, Maharastra, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Overloading Overriding

Hi There,

I downloaded a code from net. I analysed the code.

<a href="http://www.only4gurus.com/v3/download.asp?resource=3281" rel="nofollow">http://www.only4gurus.com/v3/download.asp?resource=3281</a>[<a href="http://www.only4gurus.com/v3/download.asp?resource=3281" target="_blank" rel="nofollow" title="New Window">^</a>]

The file is <i>ScopingOverloadingOverriding.zip</i>
But it doesn't works the way I thought. I belive it should give a error when Employees Salary as every employee sal should be in a particular range like for full time employee the range should be between 30000 & 50000. But it doesn't happens. Can anyone please tell me that am I correct will it show error. If not then what is the effect of line

<b>if value<30000 and value >50000 then
throw new argumentoutofrangeexception ("Salary", Full Time salary should be between 30000 and 500000")</b>

How should one diagnose the code that is given in a class file. Usually F10 mode is used but it skips code given in class file and directly returns answer to the actual code. I want to check each line of the class file.

Please Help.

Thanking you and waiting for some kind replies.


Reply With Quote
  #2 (permalink)  
Old January 15th, 2006, 03:10 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

You need to use Or instead of And. A number cannot be less than 30000 and larger than 50000 at the same time, so the code in the If statement will never fire.

Using F11 takes you into a function call, instead of stepping over it.


Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #3 (permalink)  
Old January 22nd, 2006, 12:55 AM
Registered User
Join Date: Jan 2006
Location: Mumbai, Maharastra, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Hey Thanks Imar... Thanks a lot. I will Try it.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Overloading nayeem69 .NET Framework 2.0 1 July 17th, 2007 12:30 AM
Overriding arv1980 VS.NET 2002/2003 0 January 21st, 2006 09:58 PM
enum toString() overloading kramis8 C# 0 November 21st, 2004 07:55 PM
Overloading & Overriding The Same Property DoorHandle Pro VB.NET 2002/2003 7 August 25th, 2004 07:34 AM
Overloading Initialize_Class sg48 Excel VBA 1 July 11th, 2003 07:47 AM

All times are GMT -4. The time now is 10:56 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.