Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Pro CSharp 2008 And The .NET 3.5 Platform [eng]

.pdf
Скачиваний:
78
Добавлен:
16.08.2013
Размер:
22.5 Mб
Скачать

1332 APPENDIX B PLATFORM-INDEPENDENT .NET DEVELOPMENT WITH MONO

C# 2008 language support). Efforts are underway (via the Olive project) to bring these aspects of the Microsoft .NET platform to Mono. In any case, if you need to build .NET applications that can execute under a variety of operating systems, the Mono project is a wonderful choice to do so.

Index

Special Characters

<%@ XXX %> markers, 1183 <%@Master%> directive, 1217

<%@Page%> directive attribute, ASP.NET, 1184 <%= .%> notation, 1176

<%Import%> directive, ASP.NET, 1184–1185 & operator, pointer types, 407

&& operator, 103 \" character, 89 \\ character, 89 \' character, 89

?argument, 1323

?operator, 107 ?? operator, 107 || operator, 103 + operator, 392 != operator, 102 < operator, 102 <= operator, 102 == operator, 102 > operator, 102 >= operator, 102

* operator, pointer types, 407

Numbers

3D rendered animation, 1000

100% code approach, 918

A

\a character, 89

Abort( ) method, Thread type, 595 abstract classes, 203–204, 208, 270 abstract members, 162, 204, 269, 272 abstract methods, 204–208 AccelerationRatio property, 1138 AcceptButton property, 971, 981 AcceptChanges( ) method, 785 AcceptReturn property, 1081

access modifiers, 163–164 accessor method, 164

action attribute, 1169, 1174, 1195 Action property, 887

Activate( ) method, 972 Activated event, 972

Active Template Library (ATL), description, 5 ActiveX *.dll project, 1284

<Ad> element, 1221

Add( ) method, 95, 109, 113, 432, 864, 1077, 1259, 1286, 1288, 1298

Add Reference dialog box, 489, 492, 715, 1301

Add Service Reference option, 872, 897, 908 Add Web Reference button, 908 AddAfterThis( )/AddBeforeThis( ) method, 864 AddCacheDependency( ) method, 1199 AddFirst( ) method, 864

adding and removing controls, ASP.NET, 1212 AddNewCarDialog property, 1114 AddParams object, 615

AddRef( ) method, 1291, 1305–1306 address attribute, 891

address element, 889 AddServiceEndpoint( ) method, 892, 905 ADO.NET

additional namespaces, 736 vs. ADO classic, 731

application configuration files, 742–743 asynchronous data access, 775, 777 Command object, 759–760

connected layer, 755–756

connected vs. disconnected layer, 733 connection objects, 756–758 ConnectionStringBuilder object, 758–759 connectionStrings element, application

configuration, 754–755 data provider definition, 733 data providers overview, 733, 735 DbDataReader object, 760–761 definition, 731

deleting records, 765

example, data provider factory, 751, 753–754 example database, 744

Firebird Interbase data provider, 736

IBM DB2 Universal Database data providers, 736

IDbCommand interface, 738–739 IDbConnection interface, 737 IDbDataAdapter, IDataAdapter interface, 739 IDbDataParameter, IDataParameter interface,

739

IDbDataReader, IDataReader interface, 740 IDbTransaction interface, 738

inserting records, 764 Microsoft data providers, 735

modifying tables, Command object, 763, 771 multiple result sets, DbDataReader object, 762 MySQL data providers, 736

overview, 731

parameterized command objects, 766–767 PostgreSQL providers, 736

provider factory model, 749–751

1333

1334 I N D E X

specifying DbParameter parameters, 767–768 stored procedures using DbCommand, 768 System.Data, 737

third-party data providers, 736 updating records, 765

using interfaces, 741–742 AdRotator control, 1218, 1221

AdRotator example, ASP.NET, 1221–1222 AdRotator widget, 1221 AdvertisementFile property, 1221 aggregation, 196

agnostic manner, 870 al utility, 1322

alert( ) method, 1173

AllKeys member, HttpApplicationState type, 1255 allocating objects with New keyword, 143–144 allowAnonymous attribute, Profile Data, 1274 AllowDBNull property, 787

Alt property, 977

Angle property, 1136, 1144 AngleX property, 1136 AngleY property, 1136

AnimatedButtonWithDiscreteKeyFrames.xaml file, 1143

AnimationInXaml.xaml file, 1142 AnimationUsingKeyFrames suffix, 1142 Annexes, 1316

anonymous methods, 370–371 anonymous profiles, 1277 anonymous types, 441, 443–444

App_Browsers, ASP.NET 2.0 subdirectories, 1190 App_Browsers subfolder, ASP.NET 2.0, 1190 App_Code subfolder, ASP.NET 2.0, 1190–1191 App_Data subfolder, ASP.NET 2.0, 1190 App_GlobalResources subfolder, ASP.NET 2.0, 1190 App_LocalResources subfolder, ASP.NET 2.0, 1190 App_Themes subfolder, ASP.NET 2.0, 1190 App_WebReferences subfolder, ASP.NET 2.0, 1190 App.config file, 822, 834, 854, 877, 897, 901, 1189 AppDomains

advantages, 571–572 creation example code, 574 loading example code, 575

manipulation example code, 573–574 overview, 561

relationship to processes, 571–572 unloading example code, 576–577

AppendText( ) method, FileInfo class, System.IO, 669, 672

AppExit( ) method, 1012 application cache, 1245, 1259 Application class, 1006

application configuration files, ADO.NET, 742–743 application development

cordbg.exe debugger, 35 csc.exe compiler, 35–37

installing .NET 3.5 Framework SDK, 35 notepad.exe development editor, 35

overview, 35 SharpDevelop, 35

TextPad development editor, 42 using Notepad, 46–47

using SharpDevelop, 48–50 Visual C# 2005 Express, 35

Application directory, 689

application domain, garbage collection, 256 application level state data, ASP.NET, 1255 application object, 69–70

Application property, 1195, 1253, 1256 application root categories, 249–250 application shutdown, ASP.NET, 1258 Application type, 965

application data and processing command-line arguments, 1015–1016

Windows collection, 1016 Application_End( ) event handler, 1252 Application_End( ) method, HttpApplication-

derived type, 1258 Application_Error( ) event handler, 1253 Application_Start( ) event handler, 1252, 1256,

1259 ApplicationCommands object, 1100

ApplicationCommands.Help option, 1101 Application.Current property, 1014 Application.Current.Shutdown( ) method, 1095 <ApplicationDefinition> element, 1024 Application-derived class, 1013 Application.Exit( ) method, 960, 979, 991 Application.LoadComponent( ) method,

1026–1027

ApplicationPath member, HttpRequest Type, 1196 Application.Run( ) method, 957, 965, 972 applications vs. sessions, ASP.NET, 1254 appSetting element, Web.config, ASP.NET, 1204 <appSettings> element, 1204, 1206

AppStartUp( ) method, 1012

array manipulation, multidimensional arrays, 119 Array object, 471

Array type, 460, 471 ArrayList class, 305

ArrayList System.Collections class type, 312–313 ArrayOfObjects( ) method, 116

arrays, using interface types in, 281 as keyword, 211, 277

ascending operator, 463, 469 AsEnumerable( ) method, 840–841 AskForBonus( ) method, 122 *.asmx file, 908

<asp:> tag, 1181 </asp> tag, 1186

<asp:content> scope, 1222–1223

</asp:ContentPlaceHolder> tag, 1217 <asp:ContentPlaceHolder> tag, 1217, 1222 ASP.NET

<%@Page%> directive, 1184 <%Import%> directive, 1184–1185

 

I N D E X

1335

adding and removing controls, 1212

positioning controls using HTML tables, 1243

 

AdRotator example, 1221–1222

redirecting users, 1200

 

AutoEventWireUp attribute, 1201–1202

referencing assemblies, 1190–1191

 

AutoPostBack property, 1208–1209

referencing AutoLotDAL.dll assembly, 1187

 

browser statistics in HTTP Request processing,

request/response cycle, HTTP, 1163

 

1196

round-trips (postbacks), 1172

 

categories of web controls, 1215

script block, 1185

 

classic ASP, 1175, 1177

server-side event handling, 1208

 

client-side scripting, 1172–1174

simple web controls, 1213

 

code-behind, description, 1179

simple website example, 1222

 

code-behind page model, 1186–1188

single file code model, 1179

 

compilation cycle, 1192–1193

sorting and paging example, 1227

 

data-centric single-file test page

stateless, description, 1164

 

adding data access logic, 1182–1183

submitting form data, 1174–1175

 

designing the UI, 1181–1182

System.Web.UI.Control, 1209–1210, 1212

 

manually referencing AutoLotDAL.dll, 1180

System.Web.UI.Page, 1194

 

overview, 1180

System.Web.UI.WebControls namespace,

 

role of ASP.NET directives, 1183–1185

1207–1209

 

debugging and tracing, 1188

System.Web.UI.WebControls.WebControl, 1213

 

default.aspx content page example, 1222–1224

themes

 

detailed content page example, 1228–1230

* .skin files, 1238–1239

 

Document Object Model (DOM), 1172–1173

applying at page level, 1240

 

Emitting HTML, 1199

applying sitewide, 1239–1240

 

enumerating controls with Panel control, 1210

assigning programmatically, 1241–1242

 

Error event, 1202

overview, 1237

 

feature-rich website example

SkinID Property, 1240

 

defining default.aspx content page,

updating code file, 1188

 

1222–1224

user interface in HTML, 1170–1171

 

designing inventory content page, 1224–1228

using web controls, 1207–1209

 

detailed content page, 1228–1230

validating form data, 1174

 

overview, 1215

validation controls, 1231–1235

 

working with master pages, 1216–1222

web application, description, 1164

 

form control declarations, 1185

web development server, 1166–1167

 

GET and POST, 1174–1175

web page code model, 1179, 1181

 

HTML document structure, 1168

web server, description, 1164

 

HTML form development, 1169

WebControl base class properties, 1213

 

HTML overview, 1167

website directory structure, 1190

 

HTML web controls, 1214

Windows XP Home Edition, 1166–1167

 

HTTP overview, 1163–1164

ASP.NET 2.0

 

HTTP Request members, 1196

namespaces, 1179

 

HTTP Request processing, 1195–1198

subdirectories, 1190–1191

 

HTTP Response members, 1198

ASP.NET profile API

 

HTTP Response processing, 1198–1200

accessing profile data programmatically, 1274,

 

IIS virtual directories, 1165

1276–1277

 

incoming form data, 1197–1198

ASPNETDB database, 1272–1273

 

inheritance chain, page type, 1194

defining user profile within web.config,

 

in-place editing example, 1227–1228

1273–1274

 

Internet Information Server (IIS), description,

grouping profile data and persisting custom

 

1164

objects, 1277–1279

 

inventory content page example, 1224–1228

overview, 1272

 

IsPostBack property in HTTP Request

ASP.NET website administration utility, 1205–1206

 

processing, 1198

aspnet_regsql.exe command-line utility, 1272

 

life cycle of a web page, 1200–1203

aspnet_state.exe process, 1270

 

major categories of web controls, 1213

aspnet_wp.exe process, 1270

 

master pages example, 1216–1222

<asp:TextBox> tag, 1207

 

.NET 3.5 web enhancements, 1178

*.aspx file, 1179, 1183, 1194, 1207, 1245, 1248, 1250

 

overview, 1163

aspx suffix, 1192

 

page type inheritance chain, 1194

 

 

com/.apress.http://superindex at faster it Find

1336

I N D E X

 

 

assemblies

Assembly class, System.Reflection, 528, 536–539

 

Add Reference dialog box, 489, 492

assembly directive, common intermediate

 

app.config file, 502

language (CIL), 630

 

binary code reuse, 475, 481

AssemblyBuilder, System.Reflection.Emit

 

CIL code, 484, 491

namespace, 649

 

client application example, 492

AssemblyCompanyAttribute attribute, 550

 

CLR file header, 483–484

AssemblyCopyrightAttribute attribute, 550

 

code base config file element, 519–520

AssemblyCultureAttribute attribute, 550

 

code library, 481

AssemblyDescriptionAttribute attribute, 550

 

compared with legacy executables, 480

AssemblyInfo.cs file, 549, 1309

 

consuming shared assemblies, 510–511

AssemblyKeyFileAttribute attribute, 550

 

cross-language inheritance, 495

AssemblyLoad event, System.AppDomain, 573

 

definition, 480

Assembly.Load( ) method, 1191

 

dependentAssembly config file element,

Assembly.LoadFrom( ) method, 537, 687, 690

 

514–515

AssemblyName class, System.Reflection

 

download cache, 485

namespace, 528

 

dynamic redirection to a specific version,

assembly/namespace/type distinction, 23–24

 

514–515

AssemblyOperatingSystemAttribute attribute, 550

 

embedded resources, 484

AssemblyProcessorAttribute attribute, 550

 

example of version updating, 512–515

AssemblyProductAttribute attribute, 550

 

explicit load request, 499–500

AssemblyRef, 526

 

global assembly cache (GAC), 28, 482

AssemblyResolve event, System.AppDomain, 573

 

ildasm exploration of manifest, 490

AssemblyTrademarkAttribute attribute, 550

 

implicit load request, 499–500

AssemblyVersionAttribute attribute, 550

 

internal format, 482

[Association] attribute, 851

 

language integration, 494–495, 498

AsyncCallback delegate, 909

 

manifest, 12, 481, 484

AsyncCallback delegate, multithreaded

 

metadata description, 12

applications, 591–592

 

module-level manifest, 497

asynchronous data access, ADO.NET, 775, 777

 

modules, 12, 484

asynchronous delegate call, 342–344

 

multifile, 484–485, 496–498

asynchronous I/O, 685–686

 

.NET Framework Configuration utility, 502–504,

asynchronous multithreading using delegates,

 

515

342–344

 

netmodule file extension, 485, 496–497

AsyncPattern property, 887

 

overview, 11, 475

AsyncResult class, multithreaded applications, 592

 

private, 499–500

attribute-based programming

 

probing process, 499–500

assembly, module level attributes, 549

 

publisher policy assemblies, 518–519

AttributeUsage attribute, 548–549

 

referencing external, 28

C# attribute notation, 546

 

satellite assemblies, 484

CLSCompliant attribute, 543

 

self-describing, 481

COM vs. .NET attributes, 542

 

shared assemblies, 504, 511

constructor parameters, 545

 

configuration, 512

custom attributes, 546

 

and the GAC, 509

description, 542

 

single-file, 12, 484, 486, 488–489

DllImport attribute, 543

 

strong name code example, 507

early binding, 550–551

 

strong names, 481, 490, 505–508

example of custom attributes, 547–548

 

type metadata, 481, 484, 491

extensibility, 553–558

 

updating applications using shared assemblies,

late binding, 551–553

 

512

multiple attributes, 544–545

 

version number, 481

NonSerialized attribute, 543

 

Visual Studio 2008 configuration, 502

Obsolete attribute, 543, 545–546

 

Win32 file header, 482

overview, 523

 

Windows Presentation Foundation (WPF)

restricting attributes, 548–549

 

Application class, 1006

Serializable attribute, 543

 

overview, 1005

serializing example, 544

 

Window class, 1006–1010

summary of attribute key points, 546

 

<assemblies> element, 1191

Visual Basic snap-in example, 555

WebMethod attribute, 543 Windows forms example, 556–557

attributes, assembly, module level, 550 Attributes property, FileSystemInfo class, 663 AttributeUsage attribute, 548–549 authentication element, Web.config, 1204 authorization element, Web.config, 1204 Authorization property, 892

AutoDispatch value, ClassInterfaceType enumeration, 1308

AutoDual value, ClassInterfaceType enumeration, 1308

AutoEventWireUp attribute, ASP.NET, 1201–1202 autogenerated, 1025

AutoIncrement property, 787–788 AutoIncrementSeed property, 787–788 AutoIncrementStep property, 787–788 AutoLotConnectedLayer namespace, 780 AutoLotDAL namespace, 834 AutoLotDAL.AutoLotDataSetTableAdapters

namespace, 834

AutoLotDAL.dll assembly, 809, 811, 813, 834, 840, 911, 1180

AutoLotDAL.dll library, 783, 844, 1187 AutoLotDatabase class, 846, 852 AutoLotDatabase namespace, 849 AutoLotDataSet type, 832 autoLotDB.cs file, 849

autoLotDS object, 816 AutoLotService type, 912 Automatic property, 907

AutoPostBack property, ASP.NET web controls, 1208–1209

AutoResetEvent type, 931 AutoReverse property, 1138, 1140

B

BackColor property, WebControl base class, 1213 Background property, 1108, 1148, 1154 BackgroundWorker component, 612, 614–615 *.baml files, 1026

base class, 186, 192–194, 1193

base class/derived class casting rules as keyword, 211

is keyword, 211–212 overview, 210–211 base keyword, 192, 1254

BaseAddresses property, 892 baseAddresses scope, 891 <baseAddresses> region, 891

BaseDirectory( ) method, System.AppDomain, 572 BasedOn property, 1150

BasePriority, ProcessThread type, 568 BaseStream property, 682 basicHttpBinding bindings, 899 BasicHttpBinding class, 882, 900 BasicHttpBinding option, 882 <basicHttpBinding> subelement, 900

I N D E X 1337

BasicSelections( ) method, 466 *.bat file, 72

Beep( ) property, 76

BeginAnimation( ) method, 1139, 1141 BeginCatchBlock( ) method,

System.Reflection.Emit.ILGenerator, 650 BeginClose( ) method, 892

BeginEdit( ) method, 805

Begin/End asynchronous invocation pattern, 909 BeginExceptionBlock( ) method,

System.Reflection.Emit.ILGenerator, 650 BeginFinallyBlock( ) method,

System.Reflection.Emit.ILGenerator, 650 BeginInvoke( ), multithreaded applications,

587–588, 591–593 BeginLabel( ) method,

System.Reflection.Emit.ILGenerator, 650 BeginLocal( ) method,

System.Reflection.Emit.ILGenerator, 650 BeginOpen( ) method, 892

BeginScope( ) method, System.Reflection.Emit.ILGenerator, 650

<BeginStoryboard> element, 1141 BeginTime property, 1138 BeginTransaction( ) method, DbConnection,

ADO.NET, 757 <behavior> element, 893, 895

behaviorConfiguration attribute, 894 Bin folder, 1190–1191

Binary Application Markup Language (BAML), 1026–1028

binary code reuse, 475 binary formats, 1316 binary opcodes, 619–620

binary operators, overloading, 389–391 binary resources, 1145 BinaryFormatter

deserialization, 719 serialization, 717

BinaryFormatter type, 714, 797 BinaryReader class, 682 BinaryWriter class, 682 binding, 880, 889, 1103, 1111 <bindings> element, 893, 900 BindingSource component, 824 Bitmap type, 986 BitmapImage object, 1129 black box programming, 165 blue screen of death, 1001 <body> section, 1168, 1170 booc compilers, 1321

bool data type, 80 bool keyword, 82

Boolean member variable, 1026 Border control, 1056

BorderColor property, WebControl base class, 1213 BorderStyle property, WebControl base class, 1213 BorderWidth property, WebControl base class,

1213

com/.apress.http://superindex at faster it Find

1338 I N D E X

Bottom property, 1086 Bounds property,

System.Windows.Media.Geometry base class, 1131

boxing and unboxing CIL code, 318–319

generics issues, 316, 318–319 InvalidCastException, 319

.NET 1.1 solution, 319, 321–322

.NET 2.0 solution, 323 bread crumbs, 1221 break keyword, 101

Browser Applications (XBAPs), XAML, 1004 Browser member, HttpRequest Type, 1196 Browser property, 1196

browser statistics in HTTP Request processing, ASP.NET, 1196

browser-based presentation layers, 1163 Brush property, 1132

Brush type, 989, 1036 Brushes utility class, 989 btnClickMe type, 1148 btnClickMeToo type, 1148

btnExitApp_Clicked( ) method, 1025 btnGetColor Button object, 1079 btnGetColor_Click( ) method, 1079 btnGetGameSystem property, 1078 btnShowAppVariables Button type, 1256 bubbling event, 1065

BufferedGraphics type, 987

BufferedStream type, input/output, System.IO, 661 BufferHeight property, 76

BufferWidth property, 76 bugs, description, 219

BuildCar.aspx content page, 1228 BuildMenuSystem( ) helper function, 960 BuildTableRelationship( ) method, 817 built-in style engine, 1002

business process, 917, 925 Button Click event handler, 1083 Button control, 1056, 1058, 1065 Button object, 1312

Button property, 975–976

Button type, 612, 707, 817, 950, 1022, 1078, 1081, 1108, 1138, 1142, 1148, 1150, 1154, 1156–1157, 1182–1183, 1188, 1234, 1240, 1248, 1258, 1274

Button widget, 1210 <Button> element, 1082 ButtonBase class, 1069

ButtonBase-derived type, 1071 <Button.RenderTransform> scope, 1144 by operator, 463

By property, 1138 ByRef keyword, 111 ByRef parameters, 1296 byte data type, 80

ByVal keyword, 111, 1296

C

C language deficiencies, 4 C# programming tools, 1319 C++ language deficiencies, 4

<c> code comment, XML Elements, 177 cache mechanism, 1263

Cache member variable, 1260 Cache object, 1259

Cache property, HttpResponse Type, 1198 Cache property, Page Type, 1195 CacheDependency type, 1261 CacheItemRemovedCallback delegate target

method, 1263 CacheItemRemovedCallback delegate type, 1261 Cache.NoSlidingExpiration field, 1261 CacheState web application, 1259 CalcInteropAsm.dll interop assembly, 1297 Calculate Permissions button, 708 CalculateAverage( ) method, 111

callback interfaces

event interface, 305, 307–308 overview, 341

sink object, 305, 307–308 two-way conversation, 304 CallbackContract property, 887

CanBeNull property, 848 CancelButton property, 971, 981 CancelEdit( ) method, 805 CancelEventArgs property, 974 CancelEventHandler delegate, 973 CanExecute event, 1101 CanHelpExecute( ) method, 1102 Canvas control, 1056

Canvas panel control, 1084 Canvas type, 1092 <Canvas> tag, 1085

Canvas.Bottom property, 1086 Canvas.Left property, 1086 Canvas.Left value, 1086 Canvas.Right property, 1086 Canvas.Top property, 1086 Canvas.Top value, 1086 Caption property, 787–788 CaretIndex property, 1082

carIDColumn DataColumn object, 793 carIDColumn object, 789 carInventoryGridView object, 808 CarLibrary.dll assembly, 691

Cars example database, ADO.NET, 744 carsDataSet.xml file, 796 carsInventoryDS DataSet object, 793 CarsXmlDoc resource, 1114 CaseSensitive member, 793 CaseSensitive property, 785

casting operations explicit cast, 209 implicit cast, 210

casting operator ( ), 96

catch keyword, 98 CenterToScreen( ) method, 972

ChangeDatabase( ) method, DbConnection, ADO.NET, 757

Channels property, 897 char keyword, 85

char type, 83

CheckBox control, 1056, 1102 CheckBox type, 1070 Checked events, 1070 /checked flag, 99

checked keyword, 97, 100 checked scope, 100 CheckPassword( ) method, 1083 child class, 186

ChildRelations member, 793 Circle type, 204–205

Class attribute, MainWindow, 1022 class constructors, 173

default constructor revisited, 146–147 defining custom constructors, 145–146 overview, 144

role of default constructor, 144–145 Class Designer toolbox, 190

Class Details window, 190 class diagram file, 182 Class Diagram icon, 189

class diagrams, revising, 189–190

class directive, common intermediate language (CIL), 631–632

class hierarchy, 286 class ID (CLSID), 1306 class interface, 1307 Class keyword, 141

class library definition, 481 Class Library project, 430 class name prefix, 173 Class suffix, 1288

class types, 17, 141, 432 Class1.cs file, 885

classes, differences from objects and references, 245

classic ASP and ASP.NET, 1175, 1177 classical inheritance, 160, 186 [ClassInterface] attribute, 1306, 1308, 1311

ClassInterfaceType.AutoDual class interface, 1308 Class-suffixed types, 1288

Clear( ) member, HttpApplicationState type, 1255 Clear( ) method, 76, 119, 785, 958, 987, 1199

Click event, 707, 817, 950, 960, 967, 970, 1014, 1060, 1064, 1071, 1078, 1094, 1114, 1157, 1173, 1182, 1207, 1234

Click event bubbles, 1065

Click event handler, 802–803, 818, 981, 985, 1067, 1081, 1139–1140, 1182, 1197, 1199, 1212, 1246, 1256, 1262, 1265, 1268, 1274

ClickMode property, 1069 ClickMode.Hover value, 1069

I N D E X 1339

ClickOnce deployment, 707–708 Clicks property, 975

client subelement, 894 <client> element, 897 ClientBuild.rsp file, 1327

client-side proxy/*.config file, 894 client-side scripting, 1172–1174, 1185 ClientTarget property, Page Type, 1195 Clone( ) method, 271, 786

cloneable objects (ICloneable), 295, 297–299 CloneMe( ) method, 271

Close( ) method, 160, 676, 678, 682, 891, 972 Closed event, 972

CloseMainWindow( ) method, System.Diagnostics.Process, 565

CloseTimeout property, 892 *.cls file, 1295, 1300 CLSCompliant attribute, 543 CoCar class, 1299

_CoCar interface, 1303 __CoCar_BlewUpEventHandler type, 1304 __CoCar_Event type, 1304 __CoCar_SinkHelper type, 1304 CoCarClass object, 1303

code access security observing in action, 696–697 role of code groups, 692–695 role of evidence, 689–692 role of permission sets, 695

Code Access Security (CAS), 687–689 Code activity, 927–928

code groups, role of in code access security, 692–693, 695

code libraries, 481, 1191 <Code> element, 1022–1023 CodeActivity, WF, 921 <codeBase> element, 687

code-behind model, 1029–1030, 1177, 1179, 1186–1188

CodeFile attribute, 1187

CodePage attribute, <%@Page%> directive, 1184 <codeSubDirectories> element, 1191 collection initialization, 439, 441

collections

ICollection interface, 310 IDictionary interface, 311 IDictionaryEnumerator interface, 311 IList interface, 311

overview, 269 CollectionsUtil member,

System.Collections.Specialized Namespace, 316

ColorAnimation type, 1137 ColorConverter type, 1107 coltsOnlyView type, 806 [Column] attribute, 847 ColumnAttribute property, 848 ColumnAttribute type, 845

com/.apress.http://superindex at faster it Find

1340 I N D E X

<ColumnDefinition> element, 1090 ColumnMapping property, 787 ColumnName property, 787

COM Callable Wrapper (CCW), 1283, 1306 COM IDL (interface definition language) data

types, 1290 COM Interop option, 1310

COM library statement, 1295 Combine( ) method,

System.MulticastDelegate/System Delegate, 345

ComboBox control, 1056 ComboBox type, 1078 <ComboBoxItem> element, 1076 ComCalc COM object, 1287, 1295 _ComCalc interface, 1296 ComCalc object, 1286 ComCalcClass object, 1288 ComCalc.cls class file, 1284 ComCallableDotNetServer.tlb, 1311 [ComClass] attribute, 1306 comContracts subelement, 894

Command object, ADO.NET, 733, 759–760 command prompt, Visual Studio 2003, 36 Command property, 1069 CommandBinding object, 1101

command-line arguments, processing, 1015–1016 CommandParameter property, 1069 CommandTarget property, 1069 CommandTimeout, DbCommand, ADO.NET, 760 Common dialog boxes, 956

Common Intermediate Language (CIL), 92, 94, 1316

advantages of learning, 617–618 assembly directive, 630 attributes, 619

benefits, 15

binary opcodes, 619–620 C# vs. VB.NET, 13–14 class directive, 631–632 code explained, 623–624 code labels, 624–625 compiler flags, 626 compiling code, 626–627

compiling to specific platforms, 15 complete example program, 643, 645–647 current object parameter, 642

defining the current assembly, 630 directives, 618

enums, 633

externally referenced assemblies, 629 field directive, 636

generics in, 633–634 ilasm.exe compiler, 617 interfaces, 632 iteration, 642

just-in-time (JIT) compiler, 15 locals directive, 640

mapping C# types to CIL types, 635 mapping parameters to variables, 641 maxstack directive, 640

method parameters, 638 methods, 637 mnemonics, 619–620

modifying code, 621, 623–626 module directive, 630 mresources directive, 630 namespace directive, 630 new keyword, 247

opcodes, 619, 638 overview, 13, 617 peverify.exe tool, 629

as programming language, 617 properties, 637

pushing and popping from the stack, 620–621 round-trip engineering, 621, 623–626

saving CIL code using ildasm.exe, 621, 623–624 stack-based programming, 620–621 structures, 632–633

subsystem directive, 630 token set of, 618

type constructors, 636–637 using SharpDevelop, 627 variables, local, 640 virtual execution stack, 620

Common Language Infrastructure (CLI), 1315–1316

Common Language Runtime (CLR), 22, 1283 Common Language Specification (CLS)

compliance verification, 21–22 overview, 20

Rule 1, 21–22

Common Type System (CTS), 870, 1177 adornments, 19

class types, 17 delegate types, 19

enumeration types, 18–19 interface types, 18 intrinsic types, 19 overview, 17

structure types, 18 type members, 19

commonBehaviors subelement, 894 companyLogo Image control, 1145 Compare( ) method, 87 CompareExchange( ) method, 607

CompareValidator control, ASP.NET, 1231, 1233 compilation cycle, ASP.NET 2.0

multifile pages, 1193 overview, ASP.NET 2.0, 1192 single-file pages, 1192

<compilation> element, 1189 compile time, 174 <Compile> elements, 1029 compiler error, 81

compiler-generated anonymous method, 452

CompilerOptions attribute, <%@Page%> directive, 1184

Complain( ) method, 154 Component Object Model (COM), 5 component tray, 824 ComponentsCommands object, 1100

ComSvcConfig.exe command-line tool, 883 ComUsableDotNetServer.dll, 1310 concurrency, multithreaded applications, 584,

602–607

Condition property, Properties window, 928 conditional code compilation, 435 ConditionalEventArgs type, 928 ConditionedActivityGroupActivity, WF, 921 *.config file, 687, 698, 825, 870, 872, 879, 894, 900 /config: option, 896

<configuration> element, 1191 ConfigurationManager type, 825 ConfigurationName property, 887 ConfigureAdapter( ) method, 811–812 Connect( ) method, IComponentConnector

interface, 1026

connected layer, ADO.NET, 755–756 Connection, DbCommand, ADO.NET, 760 connection objects, ADO.NET, 756–758 ConnectionString property, 825, 1225 <connectionString> element, 1273 ConnectionStringBuilder object, ADO.NET,

758–759

<connectionStrings> element, 754–755, 822, 825, 1204

ConnectionTimeout( ) method, DbConnection, ADO.NET, 757

Console Application, 415 Console class, 70 Console type, 76

console user interface (CUI), 76 ConsoleClientApp.exe, 1326 ConsoleClientApp.exe assembly, 1327 Console.ReadLine( ) method, 70 Console.WriteLine( ) method, 77, 151, 928 Const keyword, 173

constant data, 173–174 Constraints member, 793 constructor chaining, 149 constructor logic, 152

ConstructorBuilder, System.Reflection.Emit namespace, 649

constructors, 93, 141, 144 ContainerControl class, 971 containment/delegation, 185, 196

nested type definitions, 197–199 overview, 196–197

Contains( ) method, 87 Content member, 1061

Content property, 1007, 1022, 1058, 1070, 1084, 1103, 1105, 1132

Content value, 1080

I N D E X 1341

ContentControl base class, Window type, 1007 ContentEncoding property, HttpResponse Type,

1198 ContentPlaceHolderID value, 1223 <ContentPresenter> element, 1156

ContentType property, HttpResponse Type, 1198 context-agile, 578–579

context-bound, 578–579 Context.Cache.Insert( ) method, 1260 ContextMenu control, 1056 continue keyword, 101

contract element, 889 contravariance, delegates, 359 Control class, 270, 971 control commands, 1099 Control parent class, 975, 1194 Control property, 977

control state, 1251 control templates, 1156 Control type, 1213 ControlBox property, 971

ControlContent member, 1061 controls, ASP.NET, 1243

Controls member, System.Web.UI.Control, 1209 Controls property, 958, 970, 1209–1210 ControlsCollection class, 958–959

ControlState property, 1251 ControlTemplate base class, 1156 <ControlTemplate> element, 1156, 1159

ControlToValidate member, ASP.NET validator, 1231

ControlToValidate property, 1232 Convert class, 100

Convert( ) method, 1106 ConvertBack( ) method, 1106 Converter property, 1107 cookies creation, ASP.NET, 1267

Cookies member, HttpRequest Type, 1196 cookies overview, ASP.NET, 1267

Cookies property, HttpResponse Type, 1198 Copy( ) method, 786, 793

CopyTo( ) method, 119, 669 CopyToDataTable<T>( ) extension method, 842 Core infrastructure, 956

CoreLibDumper class type, 1323 CoreLibDumper.dll assembly, 1323, 1325, 1327 Count member, HttpApplicationState type, 1255 Count method, 958

covariance, 358–359, 362

Create( ) method, FileInfo class, System.IO, 669 Create( ) subroutine, 1299

CreateDataReader( ) method, 795, 838 CreateDataTable( ) method, 800 CreateDataView( ) method, 806 CreateDirectory( ) method, 703, 706 CreateFunctionalXmlDoc( ) method, 860 CreateFunctionalXmlElement( ) method, 859 CreateRectVisual( ) helper method, 1122

com/.apress.http://superindex at faster it Find