微软.Net编程规范5.0--原版.pdf

所需积分/C币:9 2019-06-25 14:39:16 3.63MB PDF
收藏 收藏
举报

微软编程规范-原版。C# (pronounced “See Sharp”) is a simple, modern, object-oriented, and type-safe programming language. C# has its roots in the C family of languages and will be immediately familiar to C, C++, and Java programmers. C# is standardized by ECMA International as the ECMA-334 standard and by ISO
错误使用“开始”选项卡将 应用于要在此处显小的文字。错误使用“开始”选项卡将 应用于要 The“Hll, World” program starts with a using system system Console o Collections using usIng Console. writeline System. Console. writeLine He l lo class declared by the"Hello, World" program has a single member, the method named main Main static MaT Writeline Console system eⅹe.dTT using system; namespace acme. collections public class stack Entry top public void push Cobject data)i top Entry (top data); public object popo i if (top = null) throw new InvalidoperationExceptiono: object result top data; top top next; return result: class Ent public Entry nexti publ c object data public Entry (Entry next, object data)[ this, next next this, data datai stack Acme collections Acme. collections. stack top PUs Pop Entry Entry next data a cme. cs csc/t: library acme.cs Main acme. dll #includ Acme collections stack acme dll using system; using Acme. collections class test static void maino i Stack s= new Stacko s Push (1) Push (10) s Push (100) Console. wri teLine(s pop( Console. WriteLine(. PopO); Console. WriteLine(s Pop o test, cs test, cs acme. dll referenced using the compilers/r csc /r: acme. dll test.cs test. exe 100 10 错误使用“开始”选项卡将 应用于要在此处显小的文字。错误使用“开始”选项卡将 应用于要 ref out C#'s value types are further divided into andC#’s wing table provides an overview of C#'s type system byte short int long byte ushort uint ulong char float double decimal bool enum Et.. struct si...3 nu object string classi.. interface I[.. nt intl,] delegate int D(...) float double decimal C#'s bool true false char string llowing table summarizes C#'s numeric types sbyte hort Int long byte ushort uInt 1 aLong oat double decimal of the new type Five of c#'s categories of types are user bject implements an interface must provide implementations of the interface's function members. An interface may int[] int int,] Int intl LI Int T? null Int nu 错误使用“开始”选项卡将 应用于要在此处显小的文字。错误使用“开始”选项卡将 应用于要 C#'s type system is unified such that a value of any type can be treated as an object. Every type in C directly or object object object int obiect int using system; class test static void main o i int 1=123: obiect o BOXIng int j= (int)o; // Unboxing object Instance, also called a“box.” is allocated to object C#'s unified type system effectively means that value types can become objects"on demand. Because of the object object new X+y*Z The following table summarizes C#'s operators, listing the operator categories in or x. m x(..) X十十 neW T( newT(...)[... newi.1 new t typeof(t) System Type T checked(x unchecked (x) default(T) T delegate i.] +Ⅹ I x 十X X (UX T awaIt x X ☆ x/y x%y 错误使用“开始”选项卡将 应用于要在此处显小的文字。错误使用“开始”选项卡将 应用于要 x t y X x < y x >> y X < y x> y x < y X >=y XIS T true x t false x as t T nu x T X== y x x∧y x y x & y x true y x false ??y y×nu11 x? y: Z y x true z x false x = y X =/=‰=+=-=<<=>>=&=A=|= (Tx)→>y new 十+十 if switch While do for foreach break continue goto throw retu yield try catch try finally checked unchecked lock usIng The following table lists C#'s statements and provides an example for each static void main o t int a; int b= 2, c=3 Console. Writeline ca +b+c) static void main o const float pi =3. 1415927f const int r=25 Console. WriteLine (pi *r*r) static void maino i t1; i=123 Expression statement Console. writeline(i Expression statement 1+十 EXpression statement Console. writeline(i) Expression statement static void Main (string[] args)t if cargs Length ==0) Console. writeline( no arguments") else t Console. writeLine( one or more arguments");

...展开详情
试读 127P 微软.Net编程规范5.0--原版.pdf
立即下载 低至0.43元/次 身份认证VIP会员低至7折
    抢沙发
    一个资源只可评论一次,评论内容不能少于5个字
    img
    HilTan

    关注 私信 TA的资源

    上传资源赚积分,得勋章
    最新推荐
    微软.Net编程规范5.0--原版.pdf 9积分/C币 立即下载
    1/127
    微软.Net编程规范5.0--原版.pdf第1页
    微软.Net编程规范5.0--原版.pdf第2页
    微软.Net编程规范5.0--原版.pdf第3页
    微软.Net编程规范5.0--原版.pdf第4页
    微软.Net编程规范5.0--原版.pdf第5页
    微软.Net编程规范5.0--原版.pdf第6页
    微软.Net编程规范5.0--原版.pdf第7页
    微软.Net编程规范5.0--原版.pdf第8页
    微软.Net编程规范5.0--原版.pdf第9页
    微软.Net编程规范5.0--原版.pdf第10页
    微软.Net编程规范5.0--原版.pdf第11页
    微软.Net编程规范5.0--原版.pdf第12页
    微软.Net编程规范5.0--原版.pdf第13页
    微软.Net编程规范5.0--原版.pdf第14页
    微软.Net编程规范5.0--原版.pdf第15页
    微软.Net编程规范5.0--原版.pdf第16页
    微软.Net编程规范5.0--原版.pdf第17页
    微软.Net编程规范5.0--原版.pdf第18页
    微软.Net编程规范5.0--原版.pdf第19页
    微软.Net编程规范5.0--原版.pdf第20页

    试读已结束,剩余107页未读...

    9积分/C币 立即下载 >