C
C
C format specifier, 45–46
C, history of, 3–4
C++, history of, 4
C#
as a component-oriented
language, 6–7
case sensitivity of, 21
history of, 3, 5–7
Internet and, 821
and Java, 3, 6
www.freepdf-books.com
I n d e x
873
keywords, 32–33
library, 8, 20, 34, 38, 437, 613, 615
and the .NET Framework, 3, 6,
7–8
program compilation, 8, 14–19
as a strongly typed language,
35, 289
version 3.0, new features in, 7
CachePolicy property, 825, 843
Call-by-reference
using ref to create a, 176–178
vs. call-by-value, 174–176
CanRead property, 365
CanSeek property, 365
CanTimeout property, 365
CanWrite property, 365
Capacity property, 758, 781, 793
Case sensitivity and C#, 21
case statement, 89–92
and goto, 106–107
Cast( ) extension method, 752
Cast(s), 42, 55, 56–58, 60–62, 496,
499, 501, 502
as operator, using the, 460–462
and enumerations, 332–333
and explicit conversion
operators, 235, 237–239, 240
catch clause, 338–345
for catching all exceptions,
345–346
and catching derived class
exceptions, 358–359
and finally, 351
multiple, using, 344–345
variable, 338, 340, 351
Ceiling( ), 618, 631
Char structure, 623, 634–640
methods, table of, 635–638
char value type, 36, 41–42, 363, 623
Character(s), 41–42
escape sequences, 47
literals, 46, 47, 49
CharacterSet property, 835
checked keyword, 360–362
checksum #pragma option, 457
Class(es), 109–114
abstract, 302–304, 305, 311, 326
base, definition of, 269
constructor.
See
Constructor(s)
data type, definition creating a
new, 111
definition of the term, 8, 12,
20, 109
derived, definition of, 269
factory, 186–187, 209–210
general form of, 110, 272
generic.
See
Generic class
and interfaces, 311, 312–316
library, .NET, 8, 20, 34, 38, 437,
613, 615
member.
See
Member(s), class
partial, 603–604
sealed, 305
static, 211–212
System, list of, 615–616
well-designed, 110
class keyword, 20, 110, 504, 517,
518, 521
Clear( ), 643, 752, 753, 767, 770, 776,
794, 795
Click event, 854, 859, 860
Clone( ), 643, 660–662
Close( ), 364, 366, 374, 376, 384, 385,
748, 827, 830
CloseMainWindow( ), 748
CLR (Common Language Runtime),
8, 9, 15, 337, 352, 585
CLS (Common Language
Specification), 9
Code
blocks.
See
Blocks, code
managed vs. unmanaged, 9,
585, 586
point, Unicode character, 634–635
section, critical, 606
unreachable, 126
unsafe, 585–598
Collect( ), 657, 658
Collection(s), 326, 749–819
bit-based, 749, 750, 771–774
definition of, 102, 152, 749
initializers, 819
specialized, 749, 750, 774
sorting user-defined classes in,
801–808
storing user-defined classes in,
799–801
using an enumerator to access,
808–811
Collection(s), generic, 749, 750,
774–799
classes, 779–799
interfaces, 775–778
Collection(s), non-generic, 749–771
classes, 755–771
interfaces, 751–755
CollectionBase class, 774
CollectionCount( ), 658
Collections API, 749, 750, 774
CollectionsUtil class, 774
Comments, 20, 21, 867
Common Language Runtime (CLR),
8, 9, 15, 337, 352, 585
Common Language Specification
(CLS), 9
Common Type System (CTS), 9
Compare( ), 631, 641, 665, 666–670,
754, 778, 805, 806–807
comparer property, 763
Comparer property, 788, 790, 793, 797
CompareOrdinal( ), 667
CompareTo( ), 157–158, 326, 534,
536–537, 624, 626, 628, 631, 635,
640, 648–649, 659, 667, 802
CompareTo(T obj), 536–537, 649, 660,
803–804
Compilation, conditional, 452
Compile( ), 581
Compiler
C# command-line, 14–15
JIT, 8, 15, 543
Components, 5
and C#, 6–7
and the internal access
modifier, 458
Concat( ), 670–672
Conditional built-in attribute, 491–492
ConnectionGroupName property, 825
Console class, 21, 364, 367, 369,
371, 382
Console.Error, 363, 364, 367, 371
Console.In, 363, 364, 367–371, 381
Console.Out, 363–364, 367, 371, 381
ConsoleKey enumeration, 370
ConsoleKeyInfo structure, 369
ConsoleModifiers enumeration, 370
const modifier, 607
Constants, 35
backslash character, 47
named integer, 311, 332
ConstrainedCopy( ), 643
Constraint(s), 503–521
base class, 504–512, 520, 521
constructor, 504, 516–517, 521
and generic interfaces, 534
and generic methods, 527
interface, 504, 512–516, 521
multiple, using, 521
naked type, 504, 520
and overload resolution, 543
reference type, 504, 517,
518–519, 521
value type, 504, 517, 519
Constructed type, 499, 543–544
and method overloading, 543
open vs. closed, 499
and static fields, 544
www.freepdf-books.com
874
C # 3 . 0 : T h e C o m p l e t e R e f e r e n c e
Constructor(s), 126–130
base clause to call a base class,
278–282, 288
in class hierarchy, order of
calling, 288–289
default, 127, 130–131
and inheritance, 276–282, 288,
291–294
object initializers vs., 199–200
overloading, 194–199, 543
parameterless, 504, 516–517
reflection to obtain a type’s,
using, 471–475
static, 210, 212
ConstructorInfo class, 472
Contains( ), 674–675, 752, 753, 767,
770, 776, 794, 795
extension method, 578–579
ContainsKey( ), 762, 763, 764, 765,
777, 787, 790, 792
ContainsValue( ), 762, 763, 764, 765,
787, 790, 792
ContentEncoding property, 835
ContentLength property, 825, 827, 835
ContentType property, 825, 827, 835
continue statement, 85, 104–105
Contravariance, 406–408
Control class, 849, 851, 852, 853, 854
Control statements.
See
Statements,
control
Controls property, 853, 864
Controls, Windows, 849, 852, 855
Conversion operators, 235–239,
243–244
implicit vs. explicit, 235, 237, 239
Conversion, type.
See
Type
conversion
ConvertAll( ), 643
ConvertFromUtf32( ), 634, 635
ConvertToUtf32( ), 634, 635
Cookie class, 836
CookieCollection, 836, 837
CookieContainer class, 837
CookieContainer property, 837
Cookies, accessing, 836–838
Cookies property, 835, 836
Copy( ), 157, 643, 651
CopyTo( ), 643, 751, 756–757, 776,
794, 795
Cos( ), 39, 618
Cosh( ), 618
Count property, 751, 758, 773, 775
Count( ) extension method, 564,
578–579, 580
Covariance, 406–408
Create( ), 824, 825, 829, 830, 833
exceptions, 830
and the Uri class, 833
CreateInstance( ), 643
Credentials property, 825, 843
Cross-language interoperability, 5, 457
.cs file extension, 20
csc.exe command-line compiler, 14–15
CTS (Common Type System), 9
CultureInfo class, 638, 666, 667
Current property, 754, 778, 808, 809,
810, 811
CurrentThread property, 746
Do'stlaringiz bilan baham: |