Volunteer .NET Evangelist

A well oiled machine can’t run efficiently, if you grease it with water.
  首页  :: 联系 :: 订阅 订阅  :: 管理

C# Trivia Test

Posted on 2006-05-06 20:28  Sheva  阅读(1215)  评论(0编辑  收藏  举报
    Eric Gunnerson just brings up a series of posts on some C# trivia that probably most developers don't know about, I just quote some of them which are more relevant to the C# technicality:

Language Details

1) How is decimal different from other C# types?
2) What kind of constructor is not legal on structs? Why?
3) What’s the difference between “out” and “[out]”?
4) When you write
ulong, what does the runtime see?
5) When can a readonly field be assigned to?
6) How many loop constructs does C# have, and what are they?
7) What is the difference between “ref” and “out”?

C# and the Runtime

1) What interfaces does foreach use in C# 1.1? What about 2.0?
2) What is the name of the attribute that controls the usage of an attribute?
3) What does
[FieldOffset(12)] do?
4) What does [IndexerName(“Fred”)] do? Why would you use it?


Do you know the answers?