C# Class Design Handbook: Coding Effective Classes

T

TargetSite property, SystemException class, 112

Teacher class example

copy constructor, 197

ICloneable interface, System namespace, 199

instance constructors, 191

private constructors, 189

static constructors, 191

this keyword

instance methods, 87

use in chaining constructors, 187

throw statement

throwing exceptions, 113

ToString method, Object class, 75, 76

overriding methods, 25

sysobject_tostring_bankaccount2, 77

try…catch…finally statement

exception handling, 112

type definition metadata, 320

type members, 55

accessibility levels, 56

constants, 56

constructors, 73

destructors, 74

events and delegates, 72

fields, 62

accessibility levels, 62

methods, 67

properties, 64

static read-only variables, 60

static type members, 69

support for, 56

type safety, 7

delegates and, 215

function pointers, 215, 216

typeof operator

primitive types and, 18

types

CLS (Common Language Specification), 9

CTS (Common Type System), 9

defining, 7, 35

description, 8

interfaces, 51

memory usage, .NET, 14

reference types, 12

arrays, 33, 42

class types, 33

delegates, 33, 41

strings, 33, 45

strongly typed language, 8

value types, 11

enumerations, 16, 28

primitive types, 15, 16

user-defined value types, 15, 22

using as reference types, 48

Категории