Compartilhar via


C# Trivia Quiz Part B

Nine more innane and largely irrelevant questions. I'm going to leave comments open so you can put forth your own answers.

Language Details

1) Java has a >>> operator. C# doesn't. Why?

2) When can a readonly field be assigned to?

C# and the Runtime

3) What does [FieldOffset(12)] do?

C# and other languages

4) Perl and C# are alike because...

Real Trivia

5) How many people were in the Visual C# Product Unit when C# was first disclosed?

6) Explain the history of the 'hort' data type, and how it relates to C#...

Power Users

7) What do the following people have in common, and how are each of them related to C#?
     James Newkirk
     Peter Solich
     Lutz Roeder

Ancient History

8) In his "Introduction to C#" talk at the first .NET PDC, Joe Nalewabau started his talk off by saying that his manager would upgrade him to first class on his trip back home if all his demos worked. Was this the truth, or was it a clever presentation device?

9) In this presentation, Joe made a joke about the PDC speaker shirts. What sport did his joke refer to?

Comments

  • Anonymous
    April 14, 2006
    Well I think I know 1,2 and 3.

    1. C# has unsigned types and Java doesn't.  The Java >>> is equivalent to the C# >> on unsigned integers.

    2. In the declaration or in the constructor.

    3. That offsets the location in memory of the field when presented to unmanaged types.
  • Anonymous
    April 14, 2006
    I know that 8 was definitely true. In fact, wasn't the challenge that he would do 10 push ups on stage if his demo crashed (which it did eventually).
  • Anonymous
    April 14, 2006
  1. Because the parser doesn't like them
    2. In the constructor - or stuff that will be put in the constructor (initializers)
    3. Changes the offset of the underlying field to 12 - you can emulate unions with that stuff - and crash .net with it.
    4. They both have C derived syntax
    5. 2(?)
    6. (?)
    7. (?)
    8. It was true (I guess)
    9. (?)
  • Anonymous
    April 15, 2006
    hort == USHORT?
  • Anonymous
    April 15, 2006
    Bleh should have remembered (http://blogs.msdn.com/213778.aspx).  I have to say I love that idea of "short, tall, grande and venti".  You could have doppios, shots and ristrettos for nibbles, tidbits and bits.  And just think of the contention you could model with multiple baristas using a limited numbers of grinders and Marzoccos, and a garbage collector that frees the objects in the dishwasher!

    Though I probably wouldn't name a programming language after it...
  • Anonymous
    April 16, 2006
  1.  Readonly can also be assigned within the static intializer block if the member is static.
  • Anonymous
    April 17, 2006
    #5 - As I recall, the term "C#" goes back to the early 90's, when MS was considering a "C++ with extensions" instead of a "Standard C++"  (note, even the "draft" ISO standard for C++ was still a few years off at that point).  They later decided to go with a straight C++ for MSC 7.0.  Visual C++ would follow two years later.  So, the number on the "Visual C# Product Unit" when "C# was first disclosed"?  -- ZERO


  • Anonymous
    April 18, 2006
  1. Perl/C# similarities;
    They both have regexes and anonymous subroutines (closures/delegates)

    Perl/C# differences;
    Perl is interpreted, C# is compiled
    Perl is weakly-typed, C# is strongly-typed
  • Anonymous
    April 20, 2006
    Some nice answers in the comments to the quiz . I'll touch on some of them. Probably.
    I think I'll...