... Types 23 1 A .2. 3 Variables 23 2 A .2. 4 Expressions 23 2 A .2. 5 Statements 23 3 A .2. 6 Namespaces 23 5 A .2. 7 Classes 23 5 A .2. 8 Structs 23 7 A .2. 9 Arrays 23 7 A .2. 10 Interfaces 23 7 A .2. 11 Enums 23 8 A .2. 12 Delegates ... Assemblies 21 2 10 .2 Attributes 21 5 10 .2. 1 Using Attributes for Exception Serialization 21 6 10 .2. 2 Using Attributes for Con...
Ngày tải lên: 05/08/2014, 10:20
... System; class Format { static void Main() { Console.WriteLine("|{0:C}| {1: C}|", 1 .23 , -1 .23 ); Console.WriteLine("|{0:D}| {1: D4}|", 12 3 , - 12 3 ); Console.WriteLine("|{0:F}| {1: F4}|", ... = new Id(); 10 11 for( intn=0;n<NumberOfEntries; n++) { 12 Console.Write("First: "); 13 string firstName = System.Console.ReadLine(); 14 id.SetFir...
Ngày tải lên: 05/08/2014, 10:20
Praise for C# 2.0: Practical Guide for Programmers 2005 phần 3 docx
... 25 5); Console.WriteLine("| {0:# .00}| {1: 0.00}| {2, 5:0.00}|{3,-5:0.00}|", .23 , .23 , .23 , .23 ); } } Output: | $1 .23 |( $1 .23 )| | 12 3 |-0 12 3 | |1 .23 |1 .23 00| |1 .23 0000E+000 |1 .23 | | 12 3 .00 % |1 .23 | |FF|000FF| FF|FF | | .23 |0 .23 | 0 .23 |0 .23 | 3 .1. 4 Declaring Destructors The ... signed 0 - 12 8 12 7 byte 8-bit unsigned 0 0 25 5 short 16 -bit...
Ngày tải lên: 05/08/2014, 10:20
Praise for C# 2.0: Practical Guide for Programmers 2005 phần 4 pdf
... } 58 } Output: HashCode o = 5 426 729 3 HashCode nc1 = 15 115 08983 HashCode nc2 = -54574958 HashCode nc3 = 15 115 08983 HashCode c1 = 18 643596 HashCode c2 = 33574638 nc1 == null? no 78 Chapter 4: Unified ... floating-point numbers. For example: 3 .14 .1e 12 (are double precision by default) 3.1E 12 3E 12 (are double precision by default) 3 .14 F (is a single precision real, using the...
Ngày tải lên: 05/08/2014, 10:20
Praise for C# 2.0: Practical Guide for Programmers 2005 phần 5 pptx
... // in binary = 0 011 11 00 010 1 10 10 System.Console.WriteLine( "{0:x}", a&b); System.Console.WriteLine( "{0:x}", a|b); System.Console.WriteLine( "{0:x}", aˆb); System.Console.WriteLine( ... ); ■ 5. 12 Other Primary Operators 10 3 int a, b; a=b =1; System.Console.Write("{0} ", a++ + ++b); / /1 +2= 3 a=b =1; System.Console.Write("{0} &qu...
Ngày tải lên: 05/08/2014, 10:20
Praise for C# 2.0: Practical Guide for Programmers 2005 phần 6 pot
... [{0}]", e); 12 8 Chapter 6: Statements and Exceptions ■ Enter a number: -1 Overflow: Value was either too large or too small for a UInt 32. Enter a number: 7 12 6 354 12 7 35 427 345 12 7 364 527 4365 12 7 4 Overflow: ... 17 return b; 18 } 19 20 // Where an exception is thrown (by the runtime system). 21 public void Process() { 22 int num = 2; 23 int den = 0; 24 // 25 26...
Ngày tải lên: 05/08/2014, 10:20
Praise for C# 2.0: Practical Guide for Programmers 2005 phần 7 ppt
... 00 :1 8 00 :1 9 00 :20 00 : 21 00 :22 00 :23 00 :24 00 :25 00 :26 00 :27 00 :28 00 :29 00:3 0 00:3 1 00: 32 00:3 3 00:3 4 00:3 5 00:3 6 00:3 7 00:3 8 00:3 9 00:4 0 00:4 1 00: 42 00:4 3 00:4 4 00:4 5 00:4 6 00:4 7 00:4 8 00:4 9 00:5 0 ... 2: 57 911 1 315 1 71 9 21 2 325 2 729 313 3353739 414 3454749 515 355 5759 024 6 810 12 1 416 1 820 222 426 2830 323 4363840 424 44648 50 525 45...
Ngày tải lên: 05/08/2014, 10:20
Praise for C# 2.0: Practical Guide for Programmers 2005 phần 8 pot
... foreach statement is exe- cuted, the GetEnumerator method of the passed collection is polymorphically invoked to generate the following output: [ 8 items] b1 :11 111 111 [16 items] b2 :10 1 010 1 011 110 000 [ ... output: [ 8 items] b1 :11 111 111 [16 items] b2 :10 1 010 1 011 110 000 [ 3 items] b3 :10 1 [ 3 items] ba :10 1 [ 3 items] a :10 1 [ 4 items] s :11 01 [ 2 items] q: 0 1 The...
Ngày tải lên: 05/08/2014, 10:20
Praise for C# 2.0: Practical Guide for Programmers 2005 phần 9 docx
... done. 11 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 11 111 111 111 111 111 111 111 111 111 111 12 2 222 222 222 222 222 222 222 222 222 222 222 222 222 222 2 22 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 22 222 222 222 222 222 222 222 222 222 222 211 111 111 111 111 111 111 111 111 11...
Ngày tải lên: 05/08/2014, 10:20