• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

MCP Exam question - 70-306 Easy Points

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
thenrich
Asked:
thenrich
  • 9
  • 6
  • 4
  • +2
2 Solutions
 
KaarthickCommented:
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
 
thenrichAuthor Commented:
I don't understand your reasoning because of this :

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

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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
KGregCommented:
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
 
KGregCommented:
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
 
thenrichAuthor Commented:
So does the autos window
0
 
RonaldBiemansCommented:
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
 
thenrichAuthor Commented:
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
 
KGregCommented:
no its not.  The locals window will show the declared variables.. but not the values, or content as they explain it.

KGreg
0
 
thenrichAuthor Commented:
KGreg,
The locals windows does indeed show values. Actually the 2 windows are identical except for the amount of scope they access.
0
 
KGregCommented:
Never mind.. the answer should be A) Autos.
0
 
RonaldBiemansCommented:
KGreg is correct.
0
 
thenrichAuthor Commented:
thus far we have 2 for answer A and 2 for answer B. Dead even
0
 
thenrichAuthor Commented:
ok now we have 2 guys that just changed their minds it's still 2 - 2
0
 
RonaldBiemansCommented:
sorry my last comment should be thenrich is correct
0
 
thenrichAuthor Commented:
It's all bogus!
I've been on .NET since beta and this type of question I could care less about.
0
 
RonaldBiemansCommented:
You said it Thenrich.

0
 
thenrichAuthor Commented:
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
 
KGregCommented:
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
 
thenrichAuthor Commented:
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
 
KGregCommented:
It could have just been an editing mistake..

KGreg
0
 
Bob LearnedCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 9
  • 6
  • 4
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now