摘要: as we know, when we initialize a type, its base constructor will be called the first time(it is recursive, actually, the Object's constuctor is the very first one), the following code demonstrate how this works: 1 class Program 2 { 3 static void Main(string[] args) 4 { 5 ...
阅读全文
摘要: readonly and const is an ooold topic in C# program language. i knew them before but i review them tonight and i put it here in english again.const:the type decorated by const is the compiling time type. which is embed in the IL during the compiling time, so you there is no memory allocated in the he
阅读全文
摘要: Content:as vs. isNamespace and assemblyAS vs. IS:common operation in our code:if(o is MyDeteminedType){ MyDeteminedType newOne=(MyDeteminedType)o;}yeah,this works well as we expected. but it makes the clr check the type twice for security. so it got some performance issues. a better one for this is.
阅读全文
摘要: 'exclam'='!''at'='@''numbersign'='#''dollar'='$''percent'='%''caret'='^''ampersand'='&''asterisk'='*''parenleft'='(''parenright'=')''
阅读全文