C# 3.0 Pocket Reference
C# 3.0 Pocket Reference, Second Edition Instant Help for C# 3.0 Programmers By Joseph Albahari, Ben Albahari
February 2008
Pages: 242

Cover | Table of Contents


Index


[ Symbols ], 
[ Numbers ], 
[ A ], 
[ B ], 
[ C ], 
[ D ], 
[ E ], 
[ F ], 
[ G ], 
[ H ], 
[ I ], 
[ J ], 
[ K ], 
[ L ], 
[ M ], 
[ N ], 
[ O ], 
[ P ], 
[ Q ], 
[ R ], 
[ S ], 
[ T ], 
[ U ], 
[ V ], 
[ W ], 
[ X ], 
[ Y ], 


Symbols[ Top ]
& (ampersand)
      address-of pointer operator, 188
      bitwise-and operator, 27, 32
      && conditional and operator, 31
* (asterisk)
      dereference pointer operator, 188
      multiplication operator, 25
@ (at sign)
      prefixing identifiers, 9
\ (backslash)
      escape sequence for, 33, 34
      preceding escape sequences, 32
{} (braces)
      enclosing statement blocks, 10, 58
^ (caret)
      exclusive-or operator, 27
: (colon)
      terminating label statement, 64
" (double quote)
      enclosing string literals, 33
      escape sequence for, 32
= (equal sign)
      == equality operator, 30, 150
      => in lambda expressions, 129
! (exclamation point)
      not operator, 31
      != inequality operator, 30, 150
/ (forward slash)
      division operator, 25
      // preceding comments, 11
      /// documentation comment, 195
      /* ... */ enclosing multi-line comments, 11
      /** ... */ documentation comment, 195
< (left angle bracket)
      less than operator, 150
      <= less than or equal operator, 150
      << shift left operator, 27
- (minus sign)
      subtraction operator, 25
      -- decrement operator, 25
      -> pointer-to-member operator, 188, 190
      -= removing delegate operands, 119
% (percent sign)
      remainder operator, 25
+ (plus sign)
      addition operator, 25
      concatenation operator, 34
      += combining delegates, 119
      ++ increment operator, 25
? (question mark)
      indicating nullable types, 148
      ?: ternary conditional operator, 32
      ?? coalescing operator, 151
> (right angle bracket)
      greater than operator, 150
      >= greater than or equal operator, 150
      >> shift right operator, 27
; (semicolon)
      terminating statements, 10
' (single quote)
      enclosing character literals, 32
      escape sequence for, 32
[] (square brackets)
      in array declaration, 36
      indexers, 76
      indexing arrays, 36
~ (tilde)
      complement operator, 27
      prefixing finalizers, 80
| (vertical bar)
      bitwise-or operator, 27, 32
      || conditional or operator, 31

Numbers[ Top ]
-0 (negative zero) value, 28
8-bit integral types, 27
16-bit integral types, 27

A[ Top ]
abstract classes, 86
abstract keyword, 101
abstract members of classes, 86
access modifiers, 97-99
accessibility capping, 98
accessors, 75, 76, 127
Action delegates, 131
addition operator (+), 25
address-of pointer operator (&), 188
ADO.NET, 209
Aggregate operator, LINQ, 168
aggregation operators, LINQ, 163, 166, 168
alert, escape sequence for, 33
aliasing types and namespaces, 68
All operator, LINQ, 163, 169
ampersand (&)
      address-of pointer operator, 188
      bitwise-and operator, 27, 32
      && conditional and operator, 31
and operator, bitwise (&), 27, 32
and operator, conditional (&&), 31
anonymous methods, 133
      (see also lambda expressions)
anonymous types, 158
Any operator, LINQ, 163, 169
AppDomain type, 205
application domains, 204
ArgumentException class, 141
ArgumentNullException class, 141
ArgumentOutOfRangeException class, 141
arguments, 45-48
arithmetic operators, 25, 53
array initialization expression, 36, 40
arrays, 36-41
      allocating to stack, 190
      allocating within a struct, 190
      bounds checking of, 41
      copying, 37
      creating dynamically, 37
      declaring, 36
      default values for, 37
      element types of, 37
      enumerating, 36
      getting and setting values of, 37
      implicitly typed arrays, 40
      indexing, 36
      initializing, 36, 37, 40
      jagged arrays, 39
      multidimensional arrays, 38
      rectangular arrays, 38
      searching, 37
      sorting, 37
as operator, 54, 85
AsEnumerable operator, LINQ, 169
ASMX Web Services, 211
ASP.NET, 205, 206
AsQueryable operator, LINQ, 169
assemblies, 7, 203
assignment expressions, 50, 56
assignment operators, 55
associativity of operators, 51
asterisk (*)
      dereference pointer operator, 188
      multiplication operator, 25
at sign (@)
      prefixing identifiers, 9
Attribute class, 184
attributes, 183-187, 203
automatic properties, 76
Average operator, LINQ, 163, 168

B[ Top ]
backend technologies, 209
backslash (\)
      escape sequence for, 33, 34
      preceding escape sequences, 32
backspace, escape sequence for, 33
base class constraint, 113
base classes, 82
base keyword, 88, 89
binary operators, 50
binary serialization engine, 203
BitConverter type, 199
bitwise operators, 27
bitwise-and operator (&), 27, 32
bitwise-or operator (|), 27, 32
bool type, 12, 30
      default values for, 44
      nullable types and, 151
bounds checking of arrays, 41
boxing, 91, 149
braces ({})
      enclosing statement blocks, 10, 58
brackets (see square brackets)
break statement, 60, 63
built-in types (see predefined types)
byte type, 21

C[ Top ]
<c> XML tag, 197
C# 3.0, new features of, 1
calculated properties, 75
camel case, 8
captured variables, in lambda expressions, 132
CardSpace, 212
caret (^)
      exclusive-or operator, 27
carriage return, escape sequence for, 33
case clause, 60
case of identifiers, 8
case of strings, changing, 35
case-sensitivity of identifiers, 8
Cast operator, LINQ, 169, 182
casting, 83
catch clause, 134, 136
chaining extension methods, 157
char type, 32
      conversions to numeric types, 33
      default values for, 44
character literals, 32
characters, escape sequences for, 32
/checked compiler switch, 26
checked operator, 26, 53
class constraint, 114
classes, 69
      abstract classes, 86
      base classes, 82
      declaration of, 69
      partial classes, 80
      sealing, 88
      static classes, 79
      subclasses, 82
      (see also anonymous types)
closure (lambda expression), 132
coalescing operator (??), 151
<code> XML tag, 197
collection initialization syntax, 117
collections, 200
colon (:)
      terminating label statement, 64
COM+, interoperability with, 210
comments, 11
comments, XML documentation, 195-198
CompareTo method, strings, 35
comparison of strings, 35
comparison operators, 31, 154
compilation, 7
compiler warnings, 194
complement operator (~), 27
compound assignment operators, 51
comprehension syntax, 171-173
Concat operator, LINQ, 164, 168
concatenation of strings, 34
conditional and operator (&&), 31
Conditional attribute, 194
conditional directives, 192
conditional not operator (!), 31
conditional operators, 31, 54
conditional or operator (||), 31
const keyword, 78
constants, 78
constructors, 14, 71-73
      field initialization order, 90
      for structs, 96
      in base class, executing, 89
      nonpublic, 73
      overloading, 71
      parameterless, 72, 89
      static, 79
Contains method, strings, 35
Contains operator, LINQ, 163, 169
contextual keywords, 9
continue statement, 63
contravariance, 121
conversion operators, LINQ, 165, 166, 169
conversions, 16
      char type, 33
      decimal types, 25
      downcasting, 84
      enums, 104
      explicit conversions, 16, 155
      floating-point types, 24
      implicit conversions, 16, 155
      integral types, 24, 27
      nullable types, 149
      numeric types, 24, 33
      overloading, 155
      upcasting, 84
Convert type, 199
Copy method, arrays, 37
Count operator, LINQ, 163, 168
covariance, 115, 122
CreateInstance method, arrays, 37
.cs file extension, 7
csc.exe file (compiler), 7
Current property, enumerators, 142
custom attributes, 186
custom types, 12-15

D[ Top ]
D suffix, numeric literals, 23
data contract serialization engine, 202
data members of a type, 13
DataSet model, ADO.NET, 209
DateTime type, 199
DateTimeOffset type, 199
Debug class, 205
decimal type, 21
      conversions to and from, 25
      when to use, 29, 30
declaration statements, 55
decrement operator (--), 25
default keyword, 112
default values, 44
DefaultIfEmpty operator, LINQ, 168
#define directive, 193
definite assignment, 43
delegate keyword, 133
delegate types, generic, 120
delegates, 117-122
      Action delegates, 131
      Func delegates, 131
      instance methods assigned to, 120
      multicast capability of, 119
      parameter compatibility with, 121
      plug-in methods using, 118
      return type compatibility, 122
      type compatibility with, 121
dereference pointer operator (*), 188
derived classes (see subclasses)
destructors (see finalizers)
diagnostics, 205
directives, preprocessor, 192-195
Distinct operator, LINQ, 167
distributed system technologies, 210-213
division operator (/), 25
.dll file extension (library), 7
/doc directive, 195
documentation comment, 195-198
domains, application, 204
double quote (")
      enclosing string literals, 33
      escape sequence for, 32
double type, 21
      special values for, 28
      when to use, 29, 30
do-while statement, 61
downcasting, 84
dynamic type checking, 93

E[ Top ]
element operators, LINQ, 162, 166, 168
ElementAt operator, LINQ, 162, 168
ElementAtOrDefault operator, LINQ, 162, 168
elements, LINQ, 160
#elif directive, 193
else clause, 58
#else directive, 193
Empty operator, LINQ, 169
#end directive, 193
#endif directive, 193
EndWith method, strings, 35
enumerators, 142-143
enums, 104-107
      combining, 105
      conversions to and from, 104
      default values for, 44
      Flags enums, 106
      operators used with, 106
equal sign (=)
      == equality operator, 30, 150
      => in lambda expressions, 129
equality operators, 30, 150, 154
Equals method, 94
#error directive, 193
escape sequences, 32
EventArgs class, 125
events, 123-129
<example> XML tag, 196
Except operator, LINQ, 164, 168
<exception> XML tag, 196
exceptions, 134
      catching, 136
      rethrowing, 139
      standard exceptions, 140
      System.Exception class, 140
      throwing, 139
exclamation point (!)
      not operator, 31
      != inequality operator, 30, 150
exclusive-or operator (^), 27
.exe file extension (application), 7
explicit conversions, 16, 155
explicit interface implementation, 100
expression statements, 56
expression trees, 129
expressions, 49-52
extension methods, 156-158

F[ Top ]
F suffix, numeric literals, 23
false value, 30
fields, 69, 72
filtering operators, LINQ, 166, 167
Finalize method, 80
finalizers, 80
finally clause, 134, 137
First operator, LINQ, 162, 168
FirstOrDefault operator, LINQ, 162, 168
fixed keyword (allocating fixed-size buffers), 190
fixed statement (pinning managed objects), 189
Flags attribute (enums), 106
float type, 21, 30
floating-point types, 22
      conversions between, 24
      conversions to and from decimal type, 25
      conversions to and from integral types, 24
      special values for, 28
for statement, 61
foreach statement, 62
      enumerating arrays using, 36
      enumerators for, 142
form feed, escape sequence for, 33
forward slash (/)
      division operator, 25
      // preceding comments, 11
      /// documentation comment, 195
      /* ... */ enclosing multi-line comments, 11
      /** ... */ documentation comment, 195
from clause, LINQ query, 171, 175-177
Func delegates, 131
function members of a type, 13
functions
      sealing, 88
      virtual, 85
      (see also lambda expressions)

G[ Top ]
garbage collector, 42, 43
generation operators, LINQ, 166, 169
generics, 108, 109
      constraints, 113-114
      covariance and, 115
      generic collections, 117
      generic delegate types, 120
      generic methods, 110
      generic parameters, 111, 113-114
      generic types, 108, 112
      self-referencing of, 116
      static data and, 116
      subclassing, 116
      typeof and, 112
get accessors, 75, 76
GetCustomAttribute method, 186
GetCustomAttributes method, 186
GetHashCode method, 95
GetType method, 93
GetValue method, arrays, 37
global namespace, 66
global:: qualifier, 68
goto statement, 60, 63
greater than operator (>), 150
greater than or equal operator (>=), 150
group clause, LINQ query, 171
GroupBy operator, LINQ, 168, 181
grouping operators, LINQ, 166, 168
GroupJoin operator, LINQ, 167, 178
Guid type, 199

H[ Top ]
heap, 42
hexadecimal codes, escape sequence for, 33
hiding inherited members, 87
horizontal tab, escape sequence for, 33

I[ Top ]
I/O (input/output), 202
identifiers, 8-10
IEnumerable interface, 142
IEnumerator interface, 142
#if directive, 193
if statement, 57-59
implicit conversions, 16, 155
implicit parameterless constructors, 72
implicitly typed arrays, 40
implicitly typed local variables, 48
<include> XML tag, 198
increment operator (++), 25
indexers, 76
IndexOf method, strings, 35
IndexOutOfRangeException class, 41
inequality operator (!=), 30, 150
infinity, special values for, 28
infix notation, 50
inheritance, 82
inherited members, hiding, 87
InnerException property, System.Exception, 140
input/output (I/O), 202
Insert method, strings, 35
instance constructors (see constructors)
instance members, 14
instance methods, precedence over extension methods, 157
instantiation, 14
int type, 11, 21
integral literals, 22-23
integral types, 21
      8- and 16-bit, implicit conversions of, 27
      conversions between, 24
      conversions to and from decimal type, 25
      conversions to and from floating-point types, 24
      division on, 25
      overflows from operations on, 26
interface constraint, 113
interfaces, 99-103
      explicitly implementing members, 100
      extending, 100
      reimplementing in subclasses, 102
      virtually implementing members, 101
internal access modifier, 76, 97
Intersect operator, LINQ, 164, 168
into keyword, LINQ, 175
InvalidCastException class, 85, 92
InvalidOperationException class, 141
is operator, 54, 85
iteration statements, 61
iterators, 143-147

J[ Top ]
jagged arrays, 39
Join method, strings, 35
Join operator, LINQ, 167, 177
joining operators, LINQ, 166, 167, 177-179
jump statements, 60, 63-64

K[ Top ]
keywords, 8-10

L[ Top ]
L suffix, numeric literals, 23
label statement, 64
lambda expressions, 129-133
      Action delegates and, 131
      compared to LINQ query syntax, 173
      expression trees for, 129
      Func delegates and, 131
      outer variables referenced by, 132
      parameter types for, 130
      type inference, 130
Language Integrated Query (see LINQ)
Last operator, LINQ, 162, 168
LastIndexOf method, strings, 35
LastOrDefault operator, LINQ, 162, 168
left angle bracket (<)
      less than operator, 150
      <= less than or equal operator, 150
      << shift left operator, 27
left-associative operators, 51
Length property, arrays, 36
less than operator (<), 150
less than or equal operator (<=), 150
let keyword, LINQ, 174
library, creating, 8
lifted operators (nullable types), 149
#line directive, 193
LINQ (Language Integrated Query), 159-164
      lambda syntax compared to, 173
      queries, 201
            continuations (into keyword), 175, 182
            deferred execution of, 164
            grouping, 181
            joining, 177-179
            multiple generators, 175-177
            of collections prior to C# 2.0, 182
            ordering, 180
            syntax, 171-173
            writing, 160-164
      query operators, 160, 166-169
      subqueries, 165
<list> XML tag, 197
literals, 10
      character literals, 32
      null literal, 19
      numeric literals, 22-23
      string literals, 33
      (see also values)
local sequences, LINQ, 160
local variables
      implicitly typed, 48
      scope of, 56
lock statement, 65
logical operators, 54
long type, 21
LongCount operator, LINQ, 168
loop statements (see iteration statements)

M[ Top ]
M suffix, numeric literals, 23
Math type, 199
Max operator, LINQ, 163, 168
members of a type, 13
      exposing to other classes, 15
      instance members, 14
      static members, 14
memory
      allocating to stack, 190
      allocating within a struct, 190
      heap, 42
      manipulation of (see pointers; unsafe code)
      stack, 42
Message property, System.Exception, 140
method call expressions, 56
methods, 70
      anonymous methods, 133
      extension methods, 156-158
      generic methods, 110
      overloading, 70, 90
      overriding, 85
      partial methods, 81
      plug-in methods, 118
      return values of, 47
      signature of, 70
      virtual methods, 85
      (see also arguments; parameters)
Microsoft Message Queuing (MSMQ), 210
Min operator, LINQ, 163, 168
minus sign (-)
      subtraction operator, 25
      -- decrement operator, 25
      -> pointer-to-member operator, 188, 190
      -= removing delegate operands, 119
MoveNext method, enumerators, 142
MSMQ (Microsoft Message Queuing), 210
multicast delegates, 119
multidimensional arrays, 38
multiplication operator (*), 25
multithreading, 204

N[ Top ]
naked type constraint, 114
name hiding (namespaces), 68
named parameters of attributes, 185
names (see identifiers)
namespace keyword, 66
namespaces, 65-68
NaN value (Not a Number), 28
native interoperability, 205
negative infinity value, 28
negative zero (-0) value, 28
nested types, 107
network protocols, 202
new line, escape sequence for, 33
new modifier (hiding inherited members), 87
new operator (instantiation), 14, 52
nonpublic constructors, 73
Not a Number (NAN) value, 28
not operator (!), 31
NotImplementedException class, 141
NotSupportedException class, 141
null literal, 19
null, escape sequence for, 33
nullable types, 148-152
Nullable<T> struct, 148
numeric literals, 22-23
numeric suffixes, 23
numeric types
      conversions between, 24
      default values for, 44
      list of, 21

O[ Top ]
object initializers, 73
object instantiation expressions, 56
object type, 90, 93
ObjectDisposedException class, 141
OfType operator, LINQ, 169, 182
operator functions (overloading), 152
operator keyword, 153
operators, 10, 49, 51-55
      arithmetic operators, 25, 53
      assignment operators, 55
      associativity of, 51
      binary operators, 50
      bitwise operators, 27
      comparison operators, 31, 154
      compound assignment operators, 51
      conditional operators, 31, 54
      decrement operator, 25
      equality operators, 30, 150, 154
      for enums, 106
      increment operator, 25
      lifted, for nullable types, 149
      list of, 52-55
      logical operators, 54
      overloading, 152-156
      pointer operators, 188
      precedence of, 51, 52-55
      query operators, LINQ, 160, 166-169
      relational operators, 54, 150
      ternary operators, 50
      unary operators, 50, 53
or operator, bitwise (|), 27, 32
or operator, conditional (||), 31
OrderBy operator, LINQ, 167, 180
OrderByDescending operator, LINQ, 167, 180
ordering operators, LINQ, 166, 167
out argument, 47
outer variables, in lambda expressions, 132
overflow check operators, 26
OverflowException class, 26
overflows on integral types, 26
overloading constructors, 71
overloading methods, 70, 90
overloading operators, 152-156
override modifier, 85

P[ Top ]
PadLeft method, strings, 35
PadRight method, strings, 35
<para> XML tag, 198
<param> XML tag, 196
parameterless constructor constraint, 114
parameterless constructors, 72, 89
parameters of attributes, 184
parameters of methods, 45-48, 71
      any number of, allowing, 48
      generic, 111, 113-114
      multiple return values with, 47
<paramref> XML tag, 197
params modifier, 48
partial classes, 80
partial methods, 81
Pascal case, 8
passing arguments by reference, 46, 47, 71
passing arguments by value, 45, 71
percent sign (%)
      remainder operator, 25
<permission> XML tag, 196
pinning objects, 189
plug-in methods, 118
plus sign (+)
      addition operator, 25
      concatenation operator, 34
      += combining delegates, 119
      ++ increment operator, 25
pointer operators, 188
pointers, 187-192
pointer-to-member operator (->), 188, 190
polymorphism, 83
positional parameters of attributes, 185
positive infinity value, 28
#pragma warning directive, 194
precedence of operators, 51
predefined types, 11, 13, 20
preprocessor directives, 192-195
primary expressions, 50
primitive types, 14, 21
private access modifier, 76, 97
projection operators, LINQ, 166, 167
properties, 74-76
protected access modifier, 97
protected internal access modifier, 97
provider layer, ADO.NET, 209
public access modifier, 15, 97, 100
punctuators, 10

Q[ Top ]
quantifiers, LINQ, 163, 166, 169
queries (see LINQ)
query comprehension syntax, 171-173
query operators, LINQ, 160, 166-169
question mark (?)
      indicating nullable types, 148
      ?: ternary conditional operator, 32
      ?? coalescing operator, 151

R[ Top ]
Random type, 199
Range operator, LINQ, 169
readonly modifier, 69
read-only properties, 75
real literals, 22
real types, 21, 29
rectangular arrays, 38
ref parameter modifier, 46
reference types, 17, 18
      array elements as, 37
      default values for, 44
      equality of, 31
      list of, 20
      nullability of, 19
      storage used by, 20
ReferenceEquals method, 95
reflection, 94, 203
Regex class, 200
#region directive, 193
relational operators, 54, 150
remainder operator (%), 25
<remarks> XML tag, 196
remoting, 211
Remove method, strings, 35
Repeat operator, LINQ, 169
reserved words (see keywords)
return statement, 64
return values of method, 47
return, escape sequence for, 33
<returns> XML tag, 196
Reverse operator, LINQ, 167
right angle bracket (>)
      greater than operator, 150
      >= greater than or equal operator, 150
      >> shift right operator, 27
right-associative operators, 52
rounding errors from real types, 29

S[ Top ]
sbyte type, 21
scope in namespaces, 67
scope of variables, 56
sealed keyword, 88
searching arrays, 37
searching strings, 35
security, 204
<see> XML tag, 197
<seealso> XML tag, 197
select clause, LINQ query, 171
Select operator, LINQ, 161, 167
selection statements, 57-61
SelectMany operator, LINQ, 167, 176
self-referencing generic declarations, 116
semicolon (;)
      terminating statements, 10
SequenceEquals operator, LINQ, 163, 169
sequences, composing, 146
sequences, LINQ, 160
serialization, 183, 202
set accessors, 75, 76
set operators, LINQ, 164, 166, 168
SetValue method, arrays, 37
shift left operator (<<), 27
shift right operator (>>), 27
short circuiting operators, 32
short type, 21
signature of method, 70
Single operator, LINQ, 162, 168
single quote (')
      enclosing character literals, 32
      escape sequence for, 32
SingleOrDefault operator, LINQ, 162, 168
sizeof operator, 53
Skip operator, LINQ, 162, 167
SkipWhile operator, LINQ, 167
Sort method, arrays, 37
Split method, strings, 35
square brackets ([])
      in array declaration, 36
      indexers, 76
      indexing arrays, 36
stack, 42
stackalloc keyword, 53, 190
StackTrace property, System.Exception, 140
StartsWith method, strings, 35
statement blocks, 10, 55, 58
statements, 55
      declaration statements, 55
      expression statements, 56
      iteration statements, 61
      jump statements, 60, 63-64
      selection statements, 57-61
      wrapping multiple lines, 10
static classes, 79
static constructors, 79
static members, 14
static type checking, 92
streams, 202
string literals, 33
string type, 12, 33-35
StringBuilder type, 34, 200
struct constraint, 114
struct keyword, 17
structs, 96
      allocating memory within, 190
      implementing interfaces, 99
subclasses, 82
Substring method, strings, 35
subtraction operator (-), 25
suffixes, numeric, 23
Sum operator, LINQ, 168
<summary> XML tag, 196
superclasses (see base classes)
switch statement, 59
System namespace, 199
system types, 199
System.ArgumentException class, 141
System.ArgumentNullException class, 141
System.ArgumentOutOfRange- Exception class, 141
System.Attribute class, 184
System.Data.Linq namespace, 201
System.Diagnostics namespace, 205
System.Drawing namespace, 208
System.Exception class, 140
System.IdentityModel namespace, 213
System.InvalidOperationEx- ception class, 141
System.IO namespace, 202
System.Linq namespace, 201
System.Linq.Expressions namespace, 201
System.Messaging namespace, 210
System.Net namespace, 202
System.NotImplementedException class, 141
System.NotSupportedException class, 141
System.ObjectDisposedException class, 141
System.Reflection namespace, 204
System.Runtime.InteropServices namespace, 205
System.Runtime.Remoting namespace, 212
System.Security namespace, 204
System.ServiceModel namespace, 211
System.Text namespace, 200
System.Text.RegularExpressions namespace, 200
System.Threading namespace, 204
System.Web.Services namespace, 212
System.Web.UI namespace, 205, 207
System.Windows namespace, 205, 207
System.Windows.Forms namespace, 205, 208
System.WorkFlow namespace, 210
System.Xml namespace, 201
System.Xml.Linq namespace, 201
System.Xml.Schema namespace, 201
System.Xml.XPath namespace, 201
System.Xml.Xsl namespace, 201

T[ Top ]
T, generic parameter, 112
tabs, escape sequences for, 33
Take operator, LINQ, 162, 167
TakeWhile operator, LINQ, 167
target of attributes, 185
ternary conditional operator (?:), 32
ternary operators, 50
text processing, 200
ThenBy operator, LINQ, 167, 180
ThenByDescending operator, LINQ, 167
this keyword (calling another constructor), 71
this property (declaring an indexer), 77
this reference, 74
Thread class, 204
threading, 204
throw statement, 64
tilde (~)
      complement operator, 27
      prefixing finalizers, 80
TimeSpan type, 199
ToArray operator, LINQ, 169
ToDictionary operator, LINQ, 169
ToList operator, LINQ, 165, 169
ToLookup operator, LINQ, 169
ToLower method, strings, 35
ToString method, 95
ToUpper method, strings, 35
Trace class, 205
TraceListener class, 205
Trim method, strings, 35
TrimEnd method, strings, 35
TrimStart method, strings, 35
true value, 30
try statement, 134-138
type checking, 92
type inference of numeric literals, 22
typeof operator, 53, 93, 112
types, 11
      aliasing, 68
      categories of, 16
      conversions between (see conversions)
      custom types, 12-15
      generic types, 108, 112
      members of, 13
      nested, 107
      numeric types, 21, 24, 44
      predefined types, 11, 13, 20
      primitive types, 14, 21
      reference types (see reference types)
      system types, 199
      value types (see value types)
      (see also classes)

U[ Top ]
U suffix, numeric literals, 23
uint type, 21
ulong type, 21
unary operators, 50, 53
unboxing, 91, 149
unchecked operator, 27, 53
#undef directive, 193
Union operator, LINQ, 164, 168
uninitialized variables, 43
unmanaged code, pointers to, 192
unsafe code, 187, 188
unsafe keyword, 188
upcasting, 84
user interface technologies, 205-208
ushort type, 21
using directive (importing namespaces), 66
using statement (leveraging IDisposable), 138

V[ Top ]
value types, 16, 17
      array elements as, 37
      equality of, 30
      list of, 20
      nullability of, 20
      representing null values (see nullable types)
      storage used by, 20
values, 11
      (see also literals)
var keyword, 40, 48
variables, 11, 41
      implicitly typed, 48
      scope of, 56
verbatim identifier, 9
verbatim string literal, 34
version 3.0 new features, 1
vertical bar (|)
      bitwise-or operator, 27, 32
      || conditional or operator, 31
vertical tab, escape sequence for, 33
virtual keyword, 85, 101
virtual methods, 85
visibility modifiers, 97-99
void expressions, 50
void* keyword, 191

W[ Top ]
#warning directive, 193
warnings, 194
WCF (Windows Communication Foundation), 210
WebClient class, 202
Where operator, LINQ, 160, 167
while statement, 61
whitespace, adding and removing from strings, 35
Windows Communication Foundation (WCF), 210
Windows Forms, 205, 208
Windows Presentation Foundation (WPF), 205, 207
Windows Workflow, 210
WPF (Windows Presentation Foundation), 205, 207

X[ Top ]
XML, 201
XML documentation, 195-198, 201
XML serialization engine, 203

Y[ Top ]
yield break statement, 145
yield return statement, 144, 145





Return to C# 3.0 Pocket Reference