Thursday, December 07, 2006

Testing Times

I'm sitting the 70-536 (Microsoft .NET Framework 2.0 – Application Development Foundation) exam tomorrow, and I sincerely hope that it's of a higher quality than the learning materials Microsoft provide for it. I've been testing myself using the official MCTS 70-536 Training Kit, and running the example tests provided.

What's disconcerting is that some of the questions are just plain wrong; here's an apposite example:

Which of the following code samples is the most efficient and compiles correctly?

  1. string s = null;
    s = "Hello";
    s += ", ";
    s += "World";
    s += "!";

  2. string s = null;
    StringBuilder sb = null;
    sb = "Hello";
    sb += ", ";
    sb += "World";
    sb += "!";
    s = sb.ToString();

  3. string s = null;
    StringBuilder sb = null;
    sb.Append("Hello");
    sb.Append(", ");
    sb.Append("World");
    sb.Append("!");
    s = sb.ToString();

  4. string s = null;
    s = "Hello";
    s += ", ";
    s += "World";
    s += "!";

So what's the correct answer? Not only do we have two identical options (1 and 4), but they also happen to be the only ones that will compile and execute. 2 is wrong because StringBuilder doesn't accept the "=" or "+=" operators, and 3 also shares the problem that the StringBuilder is never instantiated. Guess which option the test exam says is correct?

Can't say it fills me with much confidence for tomorrow...

Friday, December 08, 2006 11:50:16 AM UTC
If I am right, the training kit uses PrepLogic which I have found to be a bit odd with some questions. Personally, I use www.measureup.com
Friday, December 08, 2006 11:54:29 AM UTC

Thanks for that Ben, I'll look that up the next time I've got to sit an MS exam.
Ed
Sunday, January 07, 2007 8:26:15 AM UTC
have you pass4sure for exam 70-536?
Eng_MR@Hotmail.Com
Mohamed Ramadan
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview