Solved

MCP Exam question - 70-306   Easy Points

Posted on 2004-09-16
22
172 Views
Last Modified: 2012-05-05
In studing in for this exam I ran acorss this question in a 'purchased' study guide.

There is a function named CCValidate. This function contains several dozen variables and objects. To debug CCvalidate, you create a breakpoint at the top of a function. You run the accounting application within the VS studio .NET IDE and step through the code for CCValidate. You need to examine the contents of the variables and objects in scope on each line of code. However, you want to avoid seeing contents of all vaiables and objects within CCValidate. You also need to complete the debugging process as quickly as possible.
What should you do?

A) Use the Autos Window
B) Use the Locals Window

The study guide says B - is it right? I woulda guessed A
0
Comment
Question by:thenrich
  • 9
  • 6
  • 4
  • +2
22 Comments
 
LVL 4

Expert Comment

by:Kaarthick
ID: 12074792
As said in the document B is correct.

You will get all the values of the variables when you are trying to out a breakpoint and proceed.
0
 
LVL 5

Author Comment

by:thenrich
ID: 12074843
I don't understand your reasoning because of this :

'However, you want to avoid seeing contents of all vaiables and objects within CCValidate'
0
 
LVL 4

Expert Comment

by:Kaarthick
ID: 12074890

thenrich:You need to examine the contents of the variables and objects in scope on each line of code

so i've told that B one was right
0
 
LVL 6

Expert Comment

by:KGreg
ID: 12074899
Yes its correct.  The locals window displays values of variables and properties of objects in a localized context.  

Very helpful window for debugging.

KGreg
0
 
LVL 6

Expert Comment

by:KGreg
ID: 12074913
As you execute code, the Locals window displays the variables in scope.  If variables are initialized 20 lines ahead of your breakpoint, you won't see them listed until you step through to that point.

KGreg
0
 
LVL 5

Author Comment

by:thenrich
ID: 12074917
So does the autos window
0
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 250 total points
ID: 12074923
locals will give you  the variables local to the current context
autos will display variables used in the current statement and three statements on either side of the current statement

so A should in my opinion be  the correct answer

because of this line

However, you want to avoid seeing contents of all vaiables and objects within CCValidate
0
 
LVL 5

Author Comment

by:thenrich
ID: 12074936
I guess I'm having a hard time getting past this part of the question:

'However, you want to avoid seeing contents of all vaiables and objects within CCValidate'

That's exactly what the locals windows shows.
0
 
LVL 6

Expert Comment

by:KGreg
ID: 12074951
no its not.  The locals window will show the declared variables.. but not the values, or content as they explain it.

KGreg
0
 
LVL 5

Author Comment

by:thenrich
ID: 12075002
KGreg,
The locals windows does indeed show values. Actually the 2 windows are identical except for the amount of scope they access.
0
 
LVL 6

Assisted Solution

by:KGreg
KGreg earned 250 total points
ID: 12075007
Never mind.. the answer should be A) Autos.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 12075009
KGreg is correct.
0
 
LVL 5

Author Comment

by:thenrich
ID: 12075018
thus far we have 2 for answer A and 2 for answer B. Dead even
0
 
LVL 5

Author Comment

by:thenrich
ID: 12075029
ok now we have 2 guys that just changed their minds it's still 2 - 2
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 12075034
sorry my last comment should be thenrich is correct
0
 
LVL 5

Author Comment

by:thenrich
ID: 12075039
It's all bogus!
I've been on .NET since beta and this type of question I could care less about.
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 12075051
You said it Thenrich.

0
 
LVL 5

Author Comment

by:thenrich
ID: 12075058
OK - I'll leave the question open for today and split points to the group that has the most answer for A or B. Right now A is ahead 3 to 1
0
 
LVL 6

Expert Comment

by:KGreg
ID: 12075086
Its a matter of clarity:

"You need to examine the contents of the variables and objects in scope on each line of code."

This line points to Autos

"However, you want to avoid seeing contents of all vaiables and objects within CCValidate."

This line would point to Autos.

"You also need to complete the debugging process as quickly as possible."

This line would be a matter of preference:  Autos or Locals.  Its about how you work.

So the answer should be (A) Autos.

Is this an official MS guide.. or is it published by a 3rd party?  Could be a typo.. or oversight.

KGreg
0
 
LVL 5

Author Comment

by:thenrich
ID: 12075112
Third party from here:

http://www.exact-exams.com/70-306-exam.html

It was cheap - I guess you get what you pay for. But I've been studing from several sources including a kit from Microsoft Press that's actually pretty good.
0
 
LVL 6

Expert Comment

by:KGreg
ID: 12075116
It could have just been an editing mistake..

KGreg
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12076885
Another opinion:

"You need to examine the contents of the variables and objects in scope on each line of code"

Autos windows --> "The Autos window displays variables used in the current statement and the previous statement."

Bob
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now