Solved

MCP Exam question - 70-306   Easy Points

Posted on 2004-09-16
22
174 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Close word object 13 38
LINQ - C# to VB convertion 12 46
I need help making a collection from a class in VB.Net 3 25
Need a starter for ETL protocol? 4 39
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

912 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

20 Experts available now in Live!

Get 1:1 Help Now