03 2014 档案

CLR via C# 3rd - 08 - Methods
摘要:Kinds of methods Constructors Type constructors Overload operators Type conversions (forimplicitandexplicitcasting) Extension methods Partial methods. 1.Instance Constructors and Classes (Reference Types) Constructor methods are always called.ctor(forconstructor) in a method definitionmet... 阅读全文

posted @ 2014-03-06 09:23 iPersia 阅读(417) 评论(0) 推荐(0)

IL命令
摘要:部分CIL 操作码操作码 作用add, sub, mul, div, rem 用于两个数加减乘除求模add, or, not, xor 用于在两个值上进行二进制操作ceq, cgt, clt用不同的方法比较两个在栈上的值,ceq:是否相等;cgt:是否大约;clt:是否小于box, unbox 在引用类型和值类型之间转换ret 退出方法和返回一个值beq, bgt, ble, blt, switch 控制方法中的条件分支,beg:如果相等就中止到代码标签;bgt:如果大于就中止到代码标签; ble:如果小于等于就中止到代码标签;blt:如果小于就中止到代码标签; 所有的分支控制操作码都需要给出 阅读全文

posted @ 2014-03-03 16:02 iPersia 阅读(625) 评论(0) 推荐(0)

CLR via C# 3rd - 07 - Constants and Fields
摘要:1. Constants Aconstantis a symbol that has a never-changing value.When defining a constant symbol,its value must be determinable at compile time. The compiler then saves the constant’s valuein the assembly’s metadata. This means that you can define a constant only for types thatyour compiler consid. 阅读全文

posted @ 2014-03-03 15:12 iPersia 阅读(182) 评论(0) 推荐(0)

CLR via C# 3rd - 06 - Type and Member Basics
摘要:1. Different Kinds of Type MembersA type can define zero or more of the following kinds of members: Constants A constant is a symbol that identifies a never-changing data value Fields A field represents a read-only or read/write data value Instance constructors An instance constructor is a s... 阅读全文

posted @ 2014-03-03 11:09 iPersia 阅读(186) 评论(0) 推荐(0)

CLR via C# 3rd - 05 - Primitive, Reference, and Value Types
摘要:1.Primitive Types Any data types thecompiler directly supportsare calledprimitive types. Primitive types map directly to typesexisting in the Framework Class Library (FCL). For the types thatare compliant with the Common Language Specification (CLS), other languages will offersimilar primitive ty... 阅读全文

posted @ 2014-03-03 11:08 iPersia 阅读(444) 评论(0) 推荐(0)

CLR via C# 3rd - 04 - Type Fundamentals
摘要:1. System.Object The runtime requires every type to ultimately be derived from theSystem.Objecttype. Because all types are ultimately derived from System.Object, you are guaranteed that everyobject of every type has a minimum set of methods. Specifically, the System.Object classoffers thepublicins.. 阅读全文

posted @ 2014-03-03 11:05 iPersia 阅读(311) 评论(0) 推荐(0)

CLR via C# 3rd - 03 - Shared Assemblies and Strongly Named Assemblies
摘要:1. Weakly Named Assembly vs Strong Named Assembly Weakly named assemblies and strongly named assemblies are structurally identical—that is, they use the same portable executable (PE) file format, PE32(+) header, CLR header, metadata,manifest tables, and Intermediate Language (IL) . Thereal differe.. 阅读全文

posted @ 2014-03-03 10:57 iPersia 阅读(258) 评论(0) 推荐(0)

CLR via C# 3rd - 02 - Building, Packaging, Deploying, and Administering Applications and Types
摘要:1. C# Compiler - CSC.exe csc.exe /out:Program.exe /t:exe /r:MSCorLib.dll Program.cs This command line tells the C# compiler to emit an executable file called Program.exe(/out:Program.exe). The type of file produced is a Win32 console application(/t[arget]:exe). csc.exe /out:Program.exe /t:exe P... 阅读全文

posted @ 2014-03-03 10:53 iPersia 阅读(373) 评论(0) 推荐(0)

CLR via C# 3rd - 01 - The CLR's Execution Model
摘要:1. Assemly A managed module is a standard 32-bit Microsoft Windoes portable executable (PE32) file or a standard 64-bit Windows portable executable (PE32+) file that requires the CLR to execute. Managed Module = IL + metadata. Assembly offers a way to treat a group of files asa single entity. An... 阅读全文

posted @ 2014-03-03 10:49 iPersia 阅读(285) 评论(1) 推荐(0)

导航