magic numbers example
constants, 56
Main method
managed keyword and, 21
writing Main method to use custom
namespaces, 310
Managed Execution, 176
managed heap
boxed value types, 22
reference types, 12, 22
value types, 14
managed keyword
Main method and, 21
Manager class example
chaining constructors, 187
manifest information
viewing using MSIL Dissassembler, 326
publickey property, 337
Membership namespace
implementing namespaces, 304
MemberWiseClone method, Object class, 199
memory usage, .NET
intializing variables, 15
types as objects, 15
understanding, 14
Message property, SystemException class, 112
metadata, 297, 316
.NET module metadata, 318
assembly metadata, 318
multi-file assembly metadata, 323
introduction, 316
referenced assembly metadata, 320, 321
locale metadata, 321
single-file assemblies
viewing, 317
type definition metadata, 320
methods
see also parameterized methods.
arguments and parameters, 90
compared to properties, 68
defining, 35
designing, guidelines, 123
instance and static method
best practice, 89
example, 88
invoking methods, 85
method overloading, 67
MSIL code and, 117
overloading, 67, 106
advantages, 107
basic example, 107
guidelines for, 108
overriding methods, 25
ToString method, System.Object, 25
passing reference types versus value types
passing reference types by reference, 102
scope and visiblity, 87
signatures, 107
types of, 87
instance methods, 87
static methods, 87
Microsoft Intermediate Language
see MSIL.
modules
.NET module metadata, 318
multi-file assemblies, 322
C# module, 323
example, 323
main module, 325
VB .NET module, 324
MSIL (Microsoft Intermediate Language), 10
compiling Indexers into, 145
compiling operators into, 157
methods and, 117
scalar properties, compiling, 129
MSIL Disassembler, using, 129
MSIL Disassembler, 19
advantages, 19
delegates
viewing delegate example code, 222
scalar properties, compiling into MSIL, 129
read-write/read-only/write-only properties, defining, 133
using, 20
viewing manifest information, 326
publickey property, 337
viewing metadata
single-file assemblies, 317
viewing namespace definitions, 300
nested namespaces, 314
multicast delegates, 222, 223
adding or removing delegates, 224
architecture of events, 240
compared to single-cast delegates, 223
creating and using, 223
DelegatesEvents\ MulticastDelegates example, 224
MulticastDelegate class, System namespace, 222
GetInvocationList method, 229
multi-file assemblies
Assembly Linker tool, 322
compared to simple assembly, 322
creating, 322
example, 322
metadata, 323
modules, 322
C# module, 323
main module, 325
VB .NET module, 324
reasons for using, 322
viewing manifest information, 326
multiple implementation inheritance
not supported by C#, 268
multiple inheritance, 268
multiple interface inheritance, 268, 288
ArrayList implementing ICollection example, 268