page coordinates, 863
PageCoordinatesToLineIndex() method, 890, 893
Page_Load() event handler
event-booking application, 924
login application using SOAP headers, 1004, 1006
PaintEventArgs class, 848
painting shapes. See also OnPaint() method
clipping region and, 848–850
overview, 847–848
Panel control (Windows Forms), 774
parameters
camel casing for, 76
constructors with, adding in a hierarchy, 122–124
constructors without, adding in a hierarchy, 120–122
for custom attributes, specifying, 309–310
out parameters, 91
overloading methods and, 92
passing by reference versus by value, 89
passing to Main(),63
passing to methods, 89–91
ref parameters, 90–91
ParameterTest class, 89–90
parentheses [( )] for groups, 241–242
Parse() method, 641
partial keyword, 104–106
Pascal casing, 76, 77
passing methods. See delegates
Path class, 1188, 1191–1192
PCSDemoSite application (ASP.NET)
downloading, 944
master pages in, 958–960
navigation in, 962–963
security, 972–973
themes in, 975–979
user controls in, 950–952
PCSWebApp1 example
adding server controls, 911–913
code-behind file, 909
creating in Visual Studio, 906–908
PeekMessages() method, 1116–1117
Pen class, 866, 867–868
perfmon.exe utility, 1312–1313
performance
array lists versus dictionaries, 259
ASP.NET versus ASP,22
boxing and unboxing impacts on, 272
COM issues for, 8
demanding permissions and, 478
destructors and, 200
generics advantages for, 272–273
IL and improvements in, 5
monitoring Windows Services, 1308–1313
optimization in Visual Studio 2005, 399–400
pointer use for improving, 204, 219–222
processes versus application domains and, 15
properties and, 94–95
reference types and, 197
stack-based arrays for, 219–222
structs and, 103
value types and, 40
Web services specifications and, 1133–1134
performance monitoring for services
classes for, 1309
overview, 1309
perfmon.exe utility for, 1312–1313
performance counters for, 1309–1312
permcacl.exe permission-calculation tool, 481, 483–484
permissions for code access
changing for code groups, 494–495
creating and applying permissions sets, 495–497
creating custom, 487–488
defined, 464
error handling blocks for, 472
Identity Permissions, 472–473
managing, 492
named sets of, 473
permission classes provided by CLR, 471–472
policy levels, 476–478
SQL Server assemblies, 634–635
viewing for assemblies, 473–476
permissions in .NET Framework
asserting permissions, 486–487
CLR and demands for permissions, 478
creating custom code access permissions, 487–488
demanding permissions, 478, 479–480
denying permissions, 485–486
implicit permission, 484–485
performance issues, 478
requesting permissions, 480–484
specifying declaratively, 488
PictureBox control (Windows Forms), 772
pictures. See graphics; resources
platform independence, IL and, 4–5
pluggability (.NET Remoting)
of channels, 1024–1025
of proxy objects, 1029
plus sign (+)
in for loop iterator, 52
as increment operator (++), 135–136
regular expression groups and, 242
Point struct, 851–852
pointer member access operator, 212
pointers. See also delegates
address operator, 207
arithmetic, 210–211
for backward compatibility, 204
bugs introduced due to complexity of, 205
casting between pointer types, 209
casting to integer types, 208–209
to class members, 212–214
data types and, 208
declaring, 206–207
defined, 204
fixed keyword for, 213–214
function pointers, 171
high level trust needed at runtime, 205
indirection operator, 207
not allowed for arrays and classes, 208
for performance improvements, 204, 219–222
pointer member access operator, 212
PointerPlayaround example, 214–219
reference types compared to, 40, 204
sizeof operator with, 211
stack allocation for, 207–208
stack pointer, 194–195
stack-based arrays using, 219–222
to structs, 211–212
32-bit processors and, 207–208
unsafe keyword for, 205–206
void, 209
PointF struct, 851–852
policy levels for security
overview, 476
viewing code groups at enterprise level, 477–478
viewing code groups at user level, 476–477
Pop() method (Stack class), 254
pop-up menu for a database row
code listing, 833–834
context menu functionality and, 832
ContextDataRow class for, 834
ContextMenuAttribute for, 834, 835
DataRow and DataTable classes for, 832
filtering methods on current object, 834
PopupMenu method for, 834–835
ways of providing, 832
PopupMenu method, 834–835
pound symbol (#) for preprocessor directives, 70–73
power events, Windows Services and, 1314
#pragma preprocessor directive, 73
precedence of operators, 140
pre-emptive multitasking, 350
prefixes for variable names, 75
preprocessor directives
#define, 70, 71
defined, 70
#elif, 71–72
#else, 71–72
#endif, 71–72
#endregion, 72–73
#error,72
#if, 71–72
#line,73
not ended by semicolon, 71
pound symbol beginning, 70
#pragma,73
#region, 72–73
#undef,71
#warning,72
printing
displaying to screen versus, 894
graphics, 893–899
WebBrowser control for, 1255–1256
PrintingCapsEdit project
compiling and testing, 898–899
downloading, 895
event handlers, 896–897
Form1 class pagesPrinted field, 896
LoadFile() method, 895
using statements, 898
priorities for threads, 358–359
PriorityDocumentManager class
AddDocument() method, 290
AddDocumentToPriorityNode() method, 290–291
code listing, 289–290
GetDocument() method, 291–292
LinkedList<Document> collection in, 289
List<LinkedListNode<Document>> collection in, 289
Main() method, 292
private assemblies
overview, 18, 412–413, 419
versioning and, 412–413, 451
zero impact installation, 18
private member fields, camel casing for, 76
private modifier, 124
ProcessDocuments class
custom generic class example, 294–296
Queue<T> generic class example, 285–286
processes, application domains and, 14–16, 413
ProcessNextPerson() method (ColdCallFileReader class), 344–345
processors
JIT compilation for, 5
pointers and 32-bit processors, 207–208
pre-emptive multitasking and, 350
requirements for application deployment, 553
Professional ASP.NET 1.1 (Wiley Publishing, Inc.), 910, 940
prog id for COM objects, 1155
programming guidelines for C#
rules for identifiers, 73–75
usage conventions, 75–81
ProgressBar control (Windows Forms), 772
ProjectInstaller class, 1288–1289
properties
access modifiers, 94
for accessing user controls (ASP.NET), 947–948
adding to user controls, 796–797
Application class, 753
casing of, 76–77
of contexts (.NET Remoting), 1015, 1016
defining, 93
described, 86, 92
DirectoryInfo class, 1190
FileInfo class, 1190
of generic classes, 276–277
of generic interfaces, 275–276
get accessor, 93
of message queues, 1101–1102
naming conventions, 93
performance and, 94–95
quote server application, 1282–1283
read-only, 94
Registry class, 1231
ServiceController class, 1297
set accessor, 93
setting for channels (.NET Remoting), 1023–1024
System.SystemException class, 337
System.Type class, 314–315
usage conventions, 80
virtual, 114
Visual Studio 2005 Properties window, 394–396
write-only, avoiding, 81, 94
Properties window (Visual Studio 2005), 394–396
PropertyManager class, 819, 820–822
PropertyValueCollection class, 734
protected internal modifier, 124, 125
protected modifier, 96, 124
protocol stack, 1262
proxy classes
for delegates, 838
for .NET Remoting, 1012
transparent versus real proxy, 1012
for Web services, 990–992
proxy objects, .NET Remoting object activation and, 1027, 1029
public keyword
for constructors, 96
described, 124
for methods, 33
publisher policy files for assemblies, 450, 456–458
publishing Web sites, deployment using, 552, 555–556
Push() method (Stack class), 254