Training
Certifications
Books
Special Offers
Community




 
Inside C#
Author Tom Archer
Pages 432
Disk 1 Companion CD(s)
Level All Levels
Published 05/09/2001
ISBN 9780735612884
ISBN-10 0-7356-1288-9
Price(USD) $49.99
To see this book's discounted price, select a reseller below.
 

More Information

About the Book
Table of Contents
Sample Chapter
Index
Related Series
Related Books
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books

 

Index


Note: Italicized page references indicate figures, tables, or code listings.

Special Characters
+ (addition operator), 189, 198–99, 209, 269, 271
& (address of operator), 352
& (and operator), 271
= (assignment operator), 189, 190, 201–5, 209–12, 271
^ (caret operator), 271
: (colon), 143, 160
(,) (comma)
   in arrays, 132
   as operator in for statements, 230–31, 271
{} (curly brackets or braces operator), 41, 69, 216, 319
* (dereference operator), 352
-> (dereferencing and member access operator), 352
/ (division operator), 189, 198–99, 271
. (dot operator), 193
== (equal to operator), 190, 218, 271
> (greater than operator), 207, 271
>= (greater than or equal to operator), 207, 271
++ (increment operator), 194, 205–6, 271
< (less than operator), 207, 271
<= (less than or equal to operator), 207, 271
% (modulus operator), 189, 198–99
* (multiplication operator), 189, 198–99, 271
!= (not equal to operator), 190, 271
! (not operator), 271
() (parenthesis operators), 193, 201, 272
; (semicolon), 216
[] (square brackets operator), 144, 193, 272
+ (string concatenation operator), 190, 209
+= (string operator), 190
+ (unary plus operator), 189, 199–201, 271

A
Abort method, 308, 310
AboveNormal thread priority, 310
abstract classes, 163, 164
abstractions
   benefits of, 8, 13
   designing, 11–13
   operator overloading as, 268
   properties as, 129
abstract keyword, 128
access modifiers
   assemblies and, 373, 374
   class members and, 8, 69, 71–72, 71
   encapsulation and, 11
   inheritance and, 14
   interface methods and, 164
   querying types for, 329
   type safety and, 68
accessor methods, 123–25
Activator class, 337–39, 363
addition operator (+), 189, 198–99, 209, 269, 271
address of operator (&), 352
aggregation, 77, 99, 183–84, 268
al.exe (Assembly Generation tool), 370, 374–75
aliases, 43, 61, 61–62
   GetType method and, 329
   using directive and, 66
ambiguity, class, 44
ambiguity, name, 176–80
and operator (&), 271
annotations. See attributes
ANSI character set, 348–49
apartments, COM threading, 365–66
ApartmentState property, 366
<AppBindingMode> tag, 382–83
AppDomain class, 306–7, 341
applications
   code (see code)
   command-line arguments, 73–74
   deployment, 371
   development (see C# programming)
   name of currently executing, 334
   running, 39–40
arguments. See also parameters
   application command-line, Main method and, 73–74
   delegate, 296
   displaying, for methods, 37, 49
   Main method, 41
   naming conventions, 53
   overloaded operator, 268
   parenthesis operator and, 193
   user-defined conversions, 273
Array class, 130, 132, 134–35
ArrayList class, 138–40
arrays, 130–36
   of command-line arguments, 73–74
   declaring, 130–31
   indexers as smart, 70, 137 (see also indexers)
   iteration of, 232–34
   jagged (arrays of arrays), 135–36
   multidimensional, 132–34
   of objects, 10–11, 20
   objects as, 136–40
   of parameters, 111–12
   querying for rank of, 134–35
   as reference types, 59
   single-dimensional example, 131–32
   System.Array as base class, 130
as operator, 64, 148, 170–73, 181
assemblies, 332–36, 369–84
   benefits of, 371–72
   building, 372–75
   deployment, 32, 371–72
   global assembly cache and, 377–79
   install-time code generation and, 29
   iterating through types of, 332–35
   listing modules of, 335–36
   manifest data, 370–71
   multifile, 373–75
   overview of, 369–71
   packaging, 371
   Quick Fix Engineering updates (QFEs), 382
   reflection API and, 327
   safe mode configuration files, 382–83
   shared, 375–77
   single-file, 372–73
   using specific versions of, 383–84
   versioning, 372, 379–84
AssemblyBuilderAccess.Run value, 341
AssemblyBuilder class, 332
Assembly Cache Viewer (shfusion.dll), 377, 378
Assembly class, 332, 377
Assembly Generation tool (al.exe), 370, 374–75
AssemblyKeyFile attribute, 375–76, 380
AssemblyName class, 341
AssemblyVersion attribute, 380
assignment operator (=), 189, 271
   associativity of, 192
   compound, 201–5
   simple, 209–12
associativity, left and right, 191–92
asynchronous event handling, 70, 295–98
asynchronous processing, 282, 324
Attribute class, 145
attributes, 143–60
   assembly manifest and custom, 371
   benefits of, 143–45
   class, 146–48
   defining, 145–46
   defining usage of, with AttributeUsage attribute, 156–59
   exported DLL functions and, 346–49
   field, 151–52
   identifiers, 159–60
   method, 149–50
   parameters, 153–55
   querying about, 146–52
   querying types for, 329–31
AttributeTargets enumeration, 156–57
AttributeUsage attribute, 156–59
   defining attribute targets, 156–57
   single-use and multiuse attributes, 158–59
   specifying attribute inheritance, 159

B
background threads, 324
base classes
   constructors, 79
   derived classes and, 14
   exception handling and, 261
   polymorphism and, 20
   substitutability and, 17, 63
   virtual methods and (see virtual methods)
base class library (BCL), 24
BelowNormal thread priority, 310
benchmarking, threads and, 325
binary operators, 191–92
   overloading, 268–69, 271
binding
   early, 116
   early, to COM components, 360–61
   late, to COM components, 363–65
   polymorphism and late, 117–20
   RCWs and, 358
   reflection and late, 337–39
   safe mode, 382–83
Boolean expressions and values
   do/while statement and, 227
   if statement and, 215, 218
   methods and, 53
   relational operators and, 206
   while statement and, 225
boxing, 59–60
braces operator ({}), 41, 69, 216, 319
branching. See jump statements
break statements, 234–36
   breaking out of infinite loops, 235–36
   switch statement and, 220, 224–25
Building Block services, .NET, 23
build numbers, 370, 379

C
C/C++ programming
   code snippets, 6
   constructor initializers, 82
   cout function, 26
   function pointers, 281
   garbage collection, 94
   if statement, 218
   inline programming, 40
   instantiation, 76
   interfaces as abstract classes, 163
   object-oriented programming and, 3
   pointer operators, 352
C++ FAQs (Cline and Lomow), 17
C# programming
   arrays, 130–36
   assemblies (see assemblies)
   attributes (see attributes)
   C/C++ and (see C/C++ programming)
   choosing editors, 35–38
   class ambiguity, 44
   classes and members, 41 (see also classes; class members)
   code snippets, 6 (see also code)
   code walk-through, 40–44
   command-line compiler, 38–39 (see also compiling)
   defining namespaces, 50
   delegates and event handlers (see delegates)
   enforcement of if rules, 218–20
   environment (see Microsoft .NET Framework)
   errors, 45–46, 46 (see also errors; exception handling)
   flow control (see flow control statements)
   guidelines, 50–54
   "Hello, World" application, 38
   IL Disassembler (ILDASM), 46–49 (see also ILDASM (IL Disassembler))
   indexers, 136–40 (see also indexers)
   inline, as one-stop, 40–41
   interfaces (see interfaces)
   interoperating with unmanaged code (see interoperability; unmanaged code)
   Main methods, 41
   methods (see methods)
   multithreaded (see threading)
   namespaces and using directive, 42–43, 44
   naming conventions, 50–54 (see also naming conventions)
   non-object-oriented vs. object-oriented, 5–8 (see also object-oriented programming)
   operator overloading, 267–72 (see also operator overloading)
   operator precedence, 191, 191
   operators and expressions (see operators)
   pointer operators, 352
   properties, 123–30 (see also properties)
   querying metadata with reflection (see reflection)
   running applications, 39–40
   skeleton code for, 43
   System.Console.WriteLine method, 42
   type system (see Common Type System (CTS), .NET; types)
   user-defined conversions, 272–79
   writing simple applications, 35–40
cache, global assembly, 377–79
cache manager, assembly, 341
callback functions, delegates and, 349–50
callback methods, delegates as, 281–85
call stack, exceptions and, 259–60, 265
callvirt MSIL opcode, 119
camel casing, 52
caret operator (^), 271
Caron, Rob, 52
case statements, 220. See also switch statement
   combining, 222–24
casing, Pascal and camel, 52
caspol.exe (Code Access Security Policy) tool, 334
castclass MSIL opcode, 170
casting. See type casting
catch blocks
   design issues, 265–66
   multiple exception types, 260–61
   running code after, 249–50
catch keyword, 247–48
character sets, 348–49, 351
CharSet parameter, 348, 351
checked operator, 198
circular reference problem, 86
classes, 69–101
   abstract, 163, 164
   access modifiers, 8, 71–72, 71 (see also access modifiers)
   aliases, 43
   attributes, 146–48 (see also attributes)
   class ambiguity and namespaces, 44
   constants vs. read-only fields, 82–85
   constructors, 75–82
   defining, 69
   defining members and, 41
   deployment, 371
   encapsulation and, 11–13
   exception (see Exception class)
   inheritance and, 14–17, 97–101
   interfaces vs., 53, 161–62, 163 (see also interfaces)
   Main methods, 72–75
   marking, for deterministic finalization, 95–96
   members, 70–71 (see also class members)
   methods (see methods)
   naming conventions, 53
   .NET Framework libraries, 26–27
   objects as instantiation of, 9–11 (see also objects)
   objects vs., 9
   polymorphism and, 17–20
   properties (see properties)
   as reference types, 59
   sealed, 100–101
   self-describing, 32, 143–44, 371
   thread safety and .NET, 323
   as types, 9, 57 (see also types)
   user-defined conversions, 272–79
class keyword, 69, 143
class libraries, .NET Framework, 24, 26–27
class members
   defining, 41
   delegates as static, 285–87
   instance members and constructor initializers, 82
   naming conventions, 54
   public, 10, 11, 13
   static members vs. instance members, 77–79
   static methods and access to, 122
   type system and, 70–71
cleanup, object. See resource management
client programmer issues, 12–13, 27, 279
Close method, 323
CLR (Common Language Runtime), .NET, 24, 25, 57, 245, 265, 266
CLS (Common Language Specification), .NET, 25, 66–67, 245
Coad/Yourdon definition of problem domain, 5
code. See also applications
   cache, 377–79
   calling new, from old, 17, 20
   class ambiguity, 44
   compiling (see compiling)
   creating and executing, at run time, 340–43
   defining classes and members, 41
   injecting custom, into class code path, 282
   inline programming and one-stop programming, 40–41
   install-time generation of, 29
   legacy, 345, 366–67 (see also interoperability)
   Main method, 41
   maintenance, 253, 254
   managed (see managed code)
   metadata (see metadata; reflection)
   namespaces and using directive, 42–43
   readability and exception handling, 254–55
   reusability, 13, 15, 16, 355
   running, after catching exceptions, 249–50
   skeleton, for application development, 43
   System.Console.WriteLine method, 42
   unmanaged, 32–33, 345 (see also unmanaged code)
   unsafe (see unsafe code)
   walk-through, 40–44
Code Access Security Policy tool (caspol.exe), 334
code pitching, 29
CodeWright, 38
cohesion, tight, 253
collection, garbage. See resource management
collections, 5
   iteration of, 232–34
colon (:), 143, 160
combining. See composition
COM components. See COM interoperability
COMException class, 361
COM interoperability, 355–56
   COM Interop layer and, 355
   COM threading models and, 365–66
   early binding to COM components, 360–61
   example COM component and, 356–57
   generating metadata from COM type libraries (typelibs), 357–59, 358, 359
   late binding to COM components, 363–65
   managed code, unmanaged code, and, 33
   using dynamic type discovery to select COM interfaces, 362–63
COM Interop layer, .NET, 355. See also COM interoperability
comma (,)
   in arrays, 132
   as operator in for statements, 230–31, 271
command-line arguments
   Global Assembly Cache tool, 377–78
   Main methods and application, 73–74
Common Language Runtime (CLR), .NET, 24, 25, 57, 245, 265, 266
Common Language Specification (CLS), .NET, 25, 66–67, 245
Common Type System (CTS), .NET, 57–68. See also types
   benefits of, 66–68
   boxing and unboxing, 59–60
   casting between types, 62–64
   class member types, 70–71
   everything as objects, 57–58
   language interoperability and, 66–67
   namespaces, 64–66
   reference types, 59
   singly rooted object hierarchy of, 67
   System.Object class as root type, 60–61, 60–61, 67
   System.Type class (see Type class)
   type safety and, 67–68
   types and aliases, 61–62, 61–62
   as unified type system, 30
   value types, 58
company name
   in assembly manifest, 371
   as namespace name, 50, 52, 65
Compare method, 218
comparison method, 60
comparison operators (==, !=), 207–9
compatibility, 57–58, 67, 86–87
compiling
   assemblies, 369–70, 372–75, 380
   attribute identifiers and, 159–60
   C# command-line compiler, 38–39, 39
   errors, 45–46, 46
   JIT (just-in-time), 28–29, 377
   Microsoft intermediate language (MSIL) and, 28–29
   modules, 336
   multiple Main methods, 75
   .NET Framework class libraries, 27
   pinned variables, 355
   properties and, 126–27
   unsafe code, 353
components, COM. See COM interoperability
components, .NET. See assemblies
composition
   of case labels, 222–24
   of delegates, 289–95
   of interfaces, 183–84
   resource management and, 95
compound assignment operators, 201–5, 271
compound operators, overloading, 269
compound statements, 216
concatenation operator, string (+), 190, 209
concurrency, threads and, 324
conditional operators, 192
conditional statements. See flow control statements
configuration files, safe mode, 382–84
console applications, 39
Console class, 40, 42
constants
   as class members, 70
   read-only fields vs., 82–85
const keyword, 70, 82–83
constructors, 75–82
   attribute, 153–55
   Exception object, 256–59, 262
   inheritance and, 98
   initializers, 79–82
   instantiating, 76–77
   mutex, 321
   naming, 75–76
   overloading, 109–10
   read-only fields and, 83
   static members and instance members, 77–79
   throwing exceptions from, 256
containment, 77
context, exception, 246
   handling errors in correct, 253–54
CONTEXT structure, 305
context switching, 87, 304–5
continue statement, 237–38
controlling program flow. See flow control statements
conversions between types, 59–60, 171, 272–79
cooperative multitasking, 304
copying objects, 61
_CorExeMain function, 28
costs. See also performance
   code maintenance and, 253, 254
   threads and, 325
cout function, C++, 26
CPU utilization, threads and, 324
CreateInstance method, 363
CreateType method, 342
critical sections, 315. See also thread safety
cross-language interoperability, 25. See also interoperability
csc.exe compiler, 38–39, 39, 336. See also compiling
cs extension, 36
CTS. See Common Type System (CTS), .NET
curly brackets or braces operator ({}), 41, 69, 216, 319
Current.Thread method, 307
custom attributes, 371
custom exception classes, 261–63
cycles, reference counting and, 88

D
data
   fields as, 70
   metadata as embedded, 30 (see also reflection)
   serialized, 257
database connections, resource management and, 87
data structures. See structures
declaration
   arrays, 130–31
   exported DLL functions, 346–49
   instantiation and, 10, 77
   interfaces, 163–64
deep copies, 61
default switch statements, 221
default values, 153–54
default versioning policy, 379, 382
DefineDynamicAssembly method, 341
DefineDynamicModule method, 341
DefineMethod method, 342
DefineType method, 341
definition
   attribute targets, 156–57
   classes and members, 41, 69–71, 143
   events, 295–98
   indexers, 137–38
   namespaces, 50
delegate keyword, 283
delegates, 281–99
   as callback methods, 281–85, 349–50
   composing, 289–95
   creating, only when needed, 287–89
   defining, as static members, 285–87
   defining events with, 295–98
   as reference types, 59
   threading and, 306
deployment, assembly, 32, 332, 370, 371–72
dereference operator (*), 352
dereferencing and member access operator (->), 352
derived classes. See also inheritance
   base classes vs., 14
   Exception classes, 261–63
   signifying, with colon, 143
   substitutability and, 17, 63
   virtual methods and (see virtual methods)
design guidelines
   abstractions, 11–13
   catch blocks, 265–66
   exception handling, 263–66
   indexers, 140
   operator overloading, 272
   resource management, 96–97
   threading, 323–25
   try blocks, 263–65
destroying threads, 308–10
destructors, 85
deterministic finalization
   combining tracing and reference counting collection, 94
   design pattern, 96–97
   marking classes for, 95–96
   performance and, 88–94
   reference counting collection, 88
   resource management and, 87–88 (see also resource management)
   tracing collection, 88
development. See C# programming; Microsoft .NET Framework
device software, .NET, 23
Dijkstra, Edsger, 238–39
dimensions, querying for array, 134–35
Directory class, 339
disassembler. See ILDASM (IL Disassembler)
Dispose design pattern, 96–97
Dispose method, 97
division operator (/), 189, 198–99, 271
DllImport attribute, 346–51
DLLs (dynamic-link libraries)
   assemblies and, 369–70
   assembly versioning and, 372
   calling unmanaged functions of, 33
   creating, 372–73
   declaring exported functions, 346–49
   managed vs. unmanaged, 49, 346
do/while statement, 227–29
dot operator (.), 193
downcasting, 62–63. See also type casting
dup MSIL opcode, 204
dynamic boost values, 314
Dynamic Help, 37
dynamic type discovery, 362–63

E
early binding, 116
   to COM components, 360–61, 363
EconoJIT compiler, 29
editors, 35–38
   Notepad, 35–36
   third-party, 38
   this book and, 38
   Visual Studio 6, 36–37
   Visual Studio.NET, 37
efficiency, 4
else clauses, multiple, 217–18. See also if statement
Emit method, 342
encapsulation
   benefits of abstractions, 13
   designing abstractions, 11–13
   inline programming and, 40–41
   object-oriented programming and, 6
   operator overloading and, 272
Enter method, 317
Enterprise Servers, .NET, 24
.entrypoint MSIL keyword, 49
EntryPoint named parameter, 348
Enum functions, 349–50
EnumWindows function, 350
Equals method, 60, 208–9
equal to operator (==), 190, 218, 271
error codes, returning, 250–51
   exception handling vs., 251–53
error-handling techniques, 250–56
   code readability and, 254–55
   context and, 253–54
   exception handling vs., 251–53 (see also exception handling)
   return codes and, 250–51
   throwing exceptions from constructors, 256
errors
   COM component, 359, 361
   compile-time, 45–46, 46
   named-parameter, 155
   run-time exceptions, 63–64 (see also error-handling techniques; exception handling)
EventArgs class, 296
event keyword, 298
events
   as class members, 70
   defining, with delegates, 295–98 (see also .delegates)
   exceptions vs., 245–46
Exception class, 247, 256–63
   catching multiple exception types, 260–61
   constructing exception objects, 256–59
   deriving custom exception classes, 261–63
   handling errors in correct context and, 254
   naming custom exception classes, 262
   using StackTrace property, 259–60
exception handling, 245–66
   array out-of-bounds errors, 140
   benefits of, over return codes, 251–53
   catching exceptions, 247–48
   cleaning up with finally, 249–50
   code readability and, 254–55
   COM components and, 359, 361
   comparing techniques, 250–56
   context and, 253–54
   design guidelines, 263–66
   nonworking updates and, 383–84
   overview of, 245–46
   resource management and, 89
   rethrowing exceptions, 248–49
   return statement, 243
   syntax, 247–50
   throwing exceptions, 247
   throwing exceptions from constructors, 256
   type casting and, 63–64
   using System.Exception class (see Exception class)
executables, Win32-portable (PEs), 28, 327, 332, 369. See also assemblies
executing code at run time, 340–43
EXEs
   assemblies and, 369
   compiling (see compiling)
   managed vs. unmanaged determination of, 49
   metadata in, 30 (see also reflection)
Exit method, 317
exit statement, 239
explicit conversions, 273
explicit interface member name qualification, 173–80
   name ambiguity, 176–80
   name hiding, 173–76
exported DLL functions, 346–51
expressions, methods in Boolean, 53. See also operators
extensibility, 4, 16, 30, 123, 254
extern access modifier, 346
external assemblies, 370

F
fall-through and switch statements, 224–25
false value, 206, 217
FieldInfo class, 152
fields
   attributes, 151–52
   as class members, 70
   constants vs. read-only, 70, 82–85
   properties as smart, 70, 129–30 (see also properties)
files
   assemblies (see assemblies)
   key, 375–77
   resource management and, 87
   safe mode configuration, 382–84
finalization. See deterministic finalization
Finalize method, 61, 88, 96
finally keyword, 243, 247, 249–50, 308
first-class concept, 163
fixed keyword, 352, 353–55
fixes, QFE, 382
flow control statements, 215–44
   iteration statements, 225–34
   jump statements, 234–43
   selection statements, 215–25
folders
   assembly deployment and, 371
   global assembly cache and, 377–79
foreach statement, 232–34
for statement, 229–31
   empty, 236
   nested loops, 230
   using comma operator, 230–31
Framework. See Microsoft .NET Framework
function pointers, C++, 281
functions. See also methods
   calling unmanaged, 33
   declaring exported DLL, 346–49
   marshalling parameters for exported DLL, 350–51
   using callback, 349–50

G
gacutil.exe (Global Assembly Cache utility), 377–79, 380
Garbage Collector (GC), .NET, 85. See also resource management
   pinning and, 352, 353–55
GetCustomAttributes method, 148, 150
GetFiles method, 339
get method (getter), 70, 124–25
GetHashCode method, 60
GetILGenerator method, 342
GetLength method, 134
GetMembers method, 195
GetMethod method, 339
GetMethods method, 150, 195
GetModules method, 336
GetProcessName method, 334
GetTypeFromProgID method, 363–64
GetType method, 60, 150, 195, 328, 329, 342
GetTypes method, 334
GetWindowText function, 350
global assembly cache, 377–79, 380
goto statement, 238–43
   history of, 238–39
   using, 239–43
greater than operator (>), 207, 271
greater than or equal to operator (>=), 207, 271
guidelines, design. See design guidelines
guidelines, naming. See naming conventions
guidelines, programming, 50–54
   defining namespaces, 50
   naming conventions, 50–54

H
handles, resource management and, 87
Harry, Brian, 86
hash, signed assembly, 370
hash codes, 60
"Hello World" application, 38
   code walk-through, 40–44
   in ILDASM, 47–49, 47, 48
Help, Dynamic, 37
help, online, 45–46, 46
hiding information. See encapsulation
hiding names with interfaces, 173–76
hierarchies, class, 14
Highest thread priority, 310
highlighting, syntax, 36, 37
history of goto statement, 238–39
history of resource management, 86–87
hot fixes, 382
HRESULT type, 159–60
Hungarian notation, 51–52

I
icons, ILDASM, 48
identifiers, attribute, 159–60
if statement, 215–20
   C# enforcement of rules, 218–20
   multiple else clauses, 217–18
ILDASM (IL Disassembler), 46–49
   COM type library metadata and, 359, 359
   "Hello, World" application and, 47–49, 47, 48
   metadata and, 31, 31
   using, to determine whether EXE or DLL is .managed, 49
ILGenerator class, 342
implementation, interface, 162, 164–73
   querying by using as, 170–73
   querying by using is, 166–70
implicit conversions, 273
increment operator (++), 194, 205–6, 271
index argument, 137
indexers, 136–40
   as class members, 70
   defining, 137–38
   design guidelines, 140
   example, 138–40
   square brackets operator and, 193
infinite loops, breaking out of, 235–36
information association. See attributes
information hiding. See encapsulation
infrastructure, .NET, 24. See also Microsoft .NET Framework
inheritance, 97–101
   attribute, 159
   defining proper, 17
   interfaces and, 161, 162, 180–83
   method overriding and, 98
   multiple interfaces and, 99–100
   object-oriented programming and, 14–17
   of properties, 128
   rules of substitutability and, 97–98
   sealed classes and, 100–101
initialization
   constructors and, 75, 79–82
   for statement, 229
   lazy, 129–30
   method parameters and, 105–6, 107
   static members, 79
inline programming, 40–41
InnerException property, 258
inner exceptions, 257–58
installing assemblies, 377–78
install-time code generation, 29
instance members
   constructor initializers and, 82
   static members vs., 77–79
   static methods and, 122
InstanceOf method, 362
instances
   objects as, 9
   retrieving types of, 328
instantiation
   array, 130–31
   of classes, objects as, 9–11
   constructor, 76–77
   thread objects, 307
Int32 type, 58
IntelliSense, 30, 37, 53
interfaces, 161–85
   as abstract classes, 163
   abstraction and, 12
   classes vs., 53, 161–62
   COM, dynamic type discovery and, 362–63
   combining, 183–84
   as contracts, 17, 161
   declaring, 163–64
   deterministic finalization and, 96
   encapsulation and, 11
   example, 162–63
   explicit member name qualification, 173–80
   implementing, 164–73
   implementing vs. inheriting from, 162
   inheritance and, 180–83
   multiple, 99–100
   naming conventions, 53
   object-oriented programming and, 5–6
   operator overloading, user-defined conversions, and, 267, 279
   as reference types, 59
internal access modifier, 68, 71, 373, 374
Internet devices, .NET, 23
interoperability
   COM (see COM interoperability)
   Common Language Runtime and, 25
   Framework class libraries and, 26
   legacy code and, 366–67
   type system and, 66–67
   unmanaged code and, 32–33, 345 (see also unmanaged code)
interrogating types, 329–31
Interrupt method, 308
intranets, security and, 334
int type, 60
InvalidCastException, 64, 362
InvokeMember method, 364
Invoke method, 339
IO.Directory class, 339
isinst MSIL opcode, 170
is operator, 150, 166–70, 178
iteration
   through arrays, 232–34
   through types of assemblies, 332–35
iteration statements, 225–34
   do/while statement, 227–29
   foreach statement, 232–34
   for statement, 229–31
   while statement, 225–27

J
jagged arrays, 135–36
Java, object-oriented programming and, 3
Java Virtual Machine (JVM), 24
JIT (just-in-time) compilers, 28–29, 377
Join method, 310
jump statements, 234–43
   break statement, 234–36
   continue statement, 237–38
   goto statement, 238–43
   return statement, 243
   switch statement and, 20
just-in-time (JIT) compilers, 28–29, 377

K
key files, 375–77, 379–82
keywords, 36–37


Next




Top of Page


Last Updated: Friday, July 6, 2001