T
Tony Johansson
Hi!
I'm prepering for an 70-536 exam and in this book is the question below.
I asked this question before but didn't include all the alternatives and the
book motivation so this is the complete question
with the books motivation.
You need to create a simple class or structure that contains only value
types. You must create the class or structure so that it runs as efficiently
as
possible. You must be able to pass the class or structure to a procedure
without concern
that the procedure will modify it. Which of the following should you choose
?
A. A reference class
B. A reference structure
C. A value class
D. A value structure
The right answer is alternative D.
The book write the following comment about all the four alternatives.
A..Incorrect. You could create a reference class; however, it could be
modified when passed to a procedure.
B. Incorrect. You cannot create a reference structure
C. Incorrect. You could create a value class; however structure tend to be
more efficient.
D. Correct. Value structure are typical the most efficient
I have some question here.
The first question is: The book says the following about alternative B as
you can see above. "You cannot create a reference structure" but a reference
structure is as I assume when you add the keyword ref ???
I'm I right or wrong
My second question is: A value class is what ?????. I have never heard that
it can exist a value class but the book says
the following " You could create a value class; however structure tend to be
more efficient"
Can somebody give a comment if these exist a value class ?
When I try to figure what the correct answer might be I get into some
trouble.
The word efficiently exist in the question so if I take that into account
that would speak for selecting a reference before a value type because
passing a reference is more efficient than passing a value So according to
the word efficiently alternative A world be a good candidate.
The next thing is that I don't understand the english sentence You must be
able to pass the class or structure to a procedure without concern that the
procedure will modify it ?
If I did understand this fully I would probably have a better change to
select the correct answer.
That is this sentence that bother me because I don't know it means ?
Does it mean that the original passed argument is not allowed to be changed
or does it mean that it doesn't matter
if the original passed argument has been changed.
I hope that somebody can explain why the book is choosing alternative D
because questions like this will come
on the exam and I want to be fully prepared!
//Tony
I'm prepering for an 70-536 exam and in this book is the question below.
I asked this question before but didn't include all the alternatives and the
book motivation so this is the complete question
with the books motivation.
You need to create a simple class or structure that contains only value
types. You must create the class or structure so that it runs as efficiently
as
possible. You must be able to pass the class or structure to a procedure
without concern
that the procedure will modify it. Which of the following should you choose
?
A. A reference class
B. A reference structure
C. A value class
D. A value structure
The right answer is alternative D.
The book write the following comment about all the four alternatives.
A..Incorrect. You could create a reference class; however, it could be
modified when passed to a procedure.
B. Incorrect. You cannot create a reference structure
C. Incorrect. You could create a value class; however structure tend to be
more efficient.
D. Correct. Value structure are typical the most efficient
I have some question here.
The first question is: The book says the following about alternative B as
you can see above. "You cannot create a reference structure" but a reference
structure is as I assume when you add the keyword ref ???
I'm I right or wrong
My second question is: A value class is what ?????. I have never heard that
it can exist a value class but the book says
the following " You could create a value class; however structure tend to be
more efficient"
Can somebody give a comment if these exist a value class ?
When I try to figure what the correct answer might be I get into some
trouble.
The word efficiently exist in the question so if I take that into account
that would speak for selecting a reference before a value type because
passing a reference is more efficient than passing a value So according to
the word efficiently alternative A world be a good candidate.
The next thing is that I don't understand the english sentence You must be
able to pass the class or structure to a procedure without concern that the
procedure will modify it ?
If I did understand this fully I would probably have a better change to
select the correct answer.
That is this sentence that bother me because I don't know it means ?
Does it mean that the original passed argument is not allowed to be changed
or does it mean that it doesn't matter
if the original passed argument has been changed.
I hope that somebody can explain why the book is choosing alternative D
because questions like this will come
on the exam and I want to be fully prepared!
//Tony