Index

■Special Characters AddServiceEndpoint( ) member, ServiceHost type, #define, preprocessor directive, 317–319 1032 #elif, preprocessor directive, 317–318 ADO.NET #else, preprocessor directive, 317–318 additional namespaces, 763–764 #endif, preprocessor directive, 317–318 vs. ADO classic, 759–760 #endregion, preprocessor directive, 317 application configuration files, 769–770 #if, preprocessor directive, 317–318 asynchronous data access, 792–793 #region, preprocessor directive, 317 autogenerated data components, 824–825 #undef, preprocessor directive, 317–319 autogenerating SQL commands, 816–817 % modulo operator, #, 1097 autoincrementing, 797 & operator, pointer types, 312–313 binding DataTables to user interfaces, 804, 806 * operator, pointer types, 312–313 Command object, 781–782 ?? operator, 133 connected layer, 778 += operator, 610 connected vs. disconnected layer, 760 <%@Page%> directive attribute, ASP.NET, 846 connecting to database, Visual Studio 2005, 776 <%Import%> directive, ASP.NET, 846–847 connection objects, 779–780 => token, 1098 ConnectionStringBuilder object, 780–781 ? suffix, nullable types, 131 connectionStrings element, application configuration, 774–775 ■Numbers data access libraries, 1130 data adapter objects, 811–812 3D graphics graphical service, WPF, 1012 data providers, 760, 762 3D rendered animation, 970 data wizards, 822–825 100% code approach, 1048 DataColumn objects, 796, 798 ■ DataRelation objects, 817–820 A DataRow objects, 798–799, 801 A# , 8 DataRow.RowState property, 799–800 Abort( ) method, Thread type, 460 DataSet class, 794–796 abstract classes, 164–165, 224 datasets in XML web services, 950 abstract members (interface), 221 DataTable objects, 800 abstract methods, 165–169 DataTableReader objects, 802 AcceptChanges( ) method DataView objects, 810 ADO.NET DataRow object, 798 DbDataReader object, 782–783 ADO.NET DataSet class, 795 definition, 759–760 AcceptsReturn property, Textbox, 705 deleting records, 787 access modifiers, 76–78 deleting rows, 806–807 Action property, [OperationContract] attribute, disconnected layer, 793 1029 example, data provider factory, 772–774 Active Template (ATL), description, 5 example database, 775 Add( ) method, 1064, 1089, 1148 filling a DataSet, 812 Add Reference dialog box, 356, 359–360, 1064 filters, 807–808 Add Service Reference option, Project menu, 1038 Firebird Interbase data provider, 763 AddAfterThis( ) method, 1148 IBM DB2 Universal Database data providers, AddBeforeThis( ) method, 1148 763 AddCacheDependency( ) method, ASP.NET HTTP IDbCommand interface, 766 Response, 860 IDbConnection interface, 765 AddFirst( ) method, 1148 IDbDataAdapter, IDataAdapter interface, 767 AddRange( ) method, ControlCollection, 702 IDbDataParameter, IDataParameter interface, AddRef( ) method, 181 766 addresses, 1026 IDbDataReader, IDataReader interface, binding, and contract (ABC) service, 1024 767–768 Windows Communication Foundation (WCF), IDbTransaction interface, 765 1026 inserting records, 786 1151 1152 ■INDEX

mapping DBMS names, 813 loading example code, 438 data providers, 762–763 manipulation example code, 436–437 modifying tables, Command object, 784–786 overview, 425 multiple result sets, DbDataReader object, 784 relationship to processes, 435 multitabled DataSet objects, 817–820 thread relationship, 449 MySQL data providers, 763 unloading example code, 439–440 navigating between related tables, 820–821 AppendText( ) method, FileInfo class, System.IO, overview, 759 526, 528–529 parameterized command objects, 788 AppExit( ) method, 977 persisting datasets as XML, 803 application cache, ASP.NET, 901 PostgreSQL providers, 763 Application class, 973 provider factory model, 770–772 ApplicationExit event, 609 sort order, 807–808 ASP.NET HttpApplication members, 897 specifying DbParameter parameters, 788, 790 CompanyName property, 609 stored procedures using DbCommand, 790–791 DoEvents( ) method, 609 strongly typed datasets, 823–824 EnableVisualStyles( ) method, 609 System.Data, 764 ExecutablePath property, 609 third-party data providers, 763 Exit( ) method, 609 updating records, 787 Idle event, 609 updating rows, 809 Page Type properties, 856 updating using data adapter objects, 813–815 ProductName property, 609 using interfaces, 768–769 ProductVersion property, 609 view objects, 810 StartupPath property, 609 AdRotator example, ASP.NET, 874 System.Windows.Forms, 606 All Programs button, Windows OS, 963 ThreadExit event, 609 AllKeys property, ASP.NET HttpApplicationState application configuration files, ADO.NET, 769–770 members, 898 application development AllowDBNull property, ADO.NET DataColumn cordbg.exe debugger, 33, 40–41 object, 796 csc.exe compiler, 33–36 AnchorStyles enumeration values, 755 guide to .NET 2.0 Framework SDK, 33 animation installing .NET 2.0 Framework SDK, 33 in controls, 743 notepad.exe development editor, 33 WPF,1014 overview, 33 Animations graphical service, WPF, 1011 SharpDevelop, 33 anonymous methods TextPad development editor, 41 building query expressions using, 1120 Visual C# 2005 Express, 33 description, 282 , garbage collection, 188 example, 283–284 application level state data, ASP.NET, 898–899 anonymous methods syntax, C#’s, 1090 Application property, WebService base class, 929 anonymous types, 1090, 1116 application root categories, 182–183 anonymous types containing, 1095–1096 application shutdown, ASP.NET, 900 declarations, 1095 Application_End( ) method, Global.asax event implementation of ToString( ) and handlers in ASP.NET, 896 GetHashCode( ), 1092–1093 Application_Error( ) method, Global.asax event internal representation of, 1091–1092 handlers in ASP.NET, 896 overview, 1090 Application_Start( ) method, Global.asax event semantics of equality for, 1093–1095 handlers in ASP.NET, 896 API, 1021 Application.Current property, 979 App_Browsers, ASP.NET 2.0 subdirectories, 851 element, 983 App_Code, ASP.NET 2.0 subdirectories, 851, 853 Application-derived class, 978 App_Data, ASP.NET 2.0 subdirectories, 851 ApplicationExit event, Application class, 609 App_GlobalResources, ASP.NET 2.0 subdirectories, ApplicationId, RemotingConfiguration, 580 851 Application.LoadComponent( ) method, 985–986 App_LocalResources, ASP.NET 2.0 subdirectories, ApplicationName, RemotingConfiguration, 580 851 applications vs. sessions, ASP.NET, 897 App_Themes, ASP.NET 2.0 subdirectories, 851 appSetting element, Web.config, ASP.NET, 912 App_WebReferences, ASP.NET 2.0 subdirectories, element, 1031 851 AppStartUp( ) method, 977 app.config file, 1037, 1042, 1064, 1141 array types, 127–128 AppDomains, 1049 ArrayList System.Collections class type, 250–251 advantages, 435 creation example code, 437 ■INDEX 1153

arrays overview, 829 jagged, 129–130 page type inheritance chain, 855–856 multidimensional, 128 redirecting users, 861 as parameters and return values, 128 request/response cycle, HTTP, 829 using interface types in, 228 round-trips (postbacks), 836 in XML web services, 949 runat attribute, 847 as keyword script block, 847 determining interface support, 225 server-side event handling, 865 determining type, 172 simple web controls, 871 ascending operator, 1127 simple website example, 872–875, 877–883 ascending query operator, LINQ, 1122 single file code model, 842–843 *.asmx file, 1064 sorting and paging example, 878–879 ASP.NET stateless, description, 830 <%@Page%> directive, 846 submitting form data, 837–838 <%Import%> directive, 846–847 System.Web.UI.Control, 866–867, 869–870 adding and removing controls, 869–870 System.Web.UI.Page, 856 AdRotator example, 874 System.Web.UI.WebControls namespace, AutoEventWireUp attribute, 862–863 865–866 AutoPostBack property, 866 System.Web.UI.WebControls.WebControl, 870 browser statistics in HTTP Request processing, user interface in HTML, 834–835 858 using web controls, 865–866 at faster it Find categories of web controls, 871–872 validating form data, 837 classic ASP, 838, 840 validation controls, 883–885, client-side scripting, 836–837 version 1.x benefits, 840 code-behind, description, 842 version 2.0 code-behind page model, 847–849 benefits, 841

compilation cycle, 853 namespaces overview, 841 http://superindex.apress.com/ multifile pages, 854–855 web application, description, 830 single-file pages, 853–854 web development server, 832 debugging and tracing, 849–850 web page code model, 842–846 default.aspx content page example, 875–876 web server, description, 830 detailed content page example, 881–883 WebControl base class properties, 870–871 Document Object Model (DOM), 836 website directory structure, 851 Emitting HTML, 860 Windows XP Home Edition, 832 enumerating controls with Panel control, ASP.NET 2.0 namespaces 867–868 System.Web, 842 Error event, 863–864 System.Web.Caching, 842 form control declarations, 847 System.Web.Hosting, 842 GET and POST, 837–838 System.Web.Management, 842 HTML System.Web.Profile, 842 document structure, 833 System.Web.Security, 842 form development, 833 System.Web.SessionState, 842 overview, 832 System.Web.UI.x, 842 web controls, 871 ASP.NET 2.0 subdirectories HTTP App_Browsers, 851 overview, 829–830 App_Code, 851, 853 Request members, 857 App_Data, 851 Request processing, 857–859 App_GlobalResources, 851 Response members, 860 App_LocalResources, 851 Response processing, 859–861 App_Themes, 851 IIS virtual directories, 831 App_WebReferences, 851 incoming form data, 858–859 Bin, 851–852 inheritance chain, page type, 855–856 assemblies in-place editing example, 879–880 Add Reference dialog box, 356, 359–360 Internet Information Server (IIS), 830 app.config file, 368 inventory content page example, 877–878 binary code reuse, 347 IsPostBack property in HTTP Request CIL code, 351, 358 processing, 859 client application example, 359–360 life cycle of a web page, 861–863, 865 CLR file header, 350–351 master pages example, 872–873 code base config file element, 385, 387 menu control example, 873 code library, 347 1154 ■INDEX

compared with legacy executables, 347 , const values, 81 consuming shared assemblies, 376–377 AssemblyBuilder, System.Reflection.Emit cross-language inheritance, 362 namespace, 505 definition, 347 AssemblyCompanyAttribute attribute, 415 delayed digital signing, 375–376 AssemblyCopyrightAttribute attribute, 415 dependentAssembly config file element, AssemblyCultureAttribute attribute, 415 381–382 AssemblyDescriptionAttribute attribute, 415 , 352 AssemblyInfo.cs file, 415 dynamic redirection to a specific version, AssemblyKeyFileAttribute attribute, 416 381–382 AssemblyLoad event, System.AppDomain, 436 embedded resources, 352 AssemblyName class, System.Reflection example of version updating, 379–382 namespace, 396 explicit load request, 366, 368 assembly/namespace/type distinction, 22 flow of CLR external reference resolution, 388 AssemblyOperatingSystemAttribute attribute, 416 (GAC), 25, 348 AssemblyProcessorAttribute attribute, 416 ildasm exploration of , 357 AssemblyProductAttribute attribute, 416 implicit load request, 366, 368 AssemblyRef, 394 internal format, 349 AssemblyResolve event, System.AppDomain, 436 language integration, 360, 362, 364–365 AssemblyTrademarkAttribute attribute, 416 manifest, 11, 348, 351, 357 AssemblyVersionAttribute attribute, 416 metadata description, 10 association relationship, 1137 module-level manifest, 364 AsyncCallback delegate, multithreaded modules, 11, 352 applications, 456–457 multifile, 352, 362–365 asynchronous data access, ADO.NET, 792–793 .NET Framework Configuration utility, 369–370, asynchronous delegate call, 260–261 382 asynchronous I/O, 542–543 netmodule file extension, 352, 362–364 asynchronous multithreading using delegates, overview, 10, 347 260–261 private, 365–366, 368 AsyncPattern property, [OperationContract] probing process, 366, 368 attribute, 1029 publisher policy assemblies, 384–385 AsyncResult class, multithreaded applications, referencing external, 25 457–458 and resource files, 693 ATL (Active Template Library), description, 5 satellite assemblies, 352 attached properties, 976, 995, 1006 self-describing, 348 attribute-based programming shared assemblies, 371 assembly, module level attributes, 415 configuration, 378–379 AttributeUsage attribute, 414 and the GAC, 374 C# attribute notation, 411 single-file, 352 CLSCompliant attribute, 408–409 example, 354–356 COM vs. .NET attributes, 408 vs. multifile, 11 constructor parameters, 411 strong names, 348, 357, 371, 373–374 custom attributes, 412 assigning using Visual Studio 2005, 374 description, 408 code example, 373 DllImport attribute, 409 type metadata, 348, 351, 358 early binding, 416–417 updating applications using shared assemblies, example of custom attributes, 413 378–379 extensibility version number, 348 and dynamic loading, 418 Visual Studio 2005 configuration, 368 and late binding, 418 Win32 file header, 349 and reflection, 418 Windows Presentation Foundation (WPF) using attributes, 418–424 Application class, 973 late binding, 417–418 overview, 972–973 multiple attributes, 410–411 Window class, 974–976 NonSerialized attribute, 409 Assembly class, System.Reflection namespace, Obsolete attribute, 408–409, 411 396, 402–406 overview, 391 assembly directive, common intermediate restricting attributes, 414 language (CIL), 488 Serializable attribute, 409 assembly manifest serializing example, 409–410 initial example, 15 summary of attribute key points, 412 overview, 15 snap-in example, 420–421 ■INDEX 1155

WebMethod attribute, 409 binary code reuse, 347 example, 421–422 binary opcodes, 479 attributes, 415–416, 479 BinaryFormatter Attributes property, FileSystemInfo class, 519, 521 deserialization, 551 AttributeUsage attribute, 414 serialization, 548, 550–551 authentication element, Web.config, ASP.NET, 912 BinaryReader class, 517, 538–539 authorization element, Web.config, ASP.NET, 912 BinaryWriter class, 538 Authorization member, ServiceHost type, 1033 binding DataTables to user interfaces, ADO.NET, AutoCheck property, Button, 711 804, 806 AutoEventWireUp attribute, ASP.NET, 862–863 binding element, WSDL document elements, 939 AutoGen property, [Column] attribute, 1133 bindings, 1024–1026 autogenerated, 984 blue screen of death, 971 autogenerating SQL commands, ADO.NET, Boolean member variable, 985 816–817 Boolean statement, 1115 AutoIncrement- property, ADO.NET DataColumn boxing and unboxing, 104–106 object, 796 CIL code, 322 autoincrementing, ADO.NET, 797 generics issues, 321–322 AutoPostBack property, ASP.NET web controls, InvalidCastException, 322 866 .NET 1.1 solution, 323–324 AutoResetEvent type, 1060 .NET 2.0 solution, 325 BrowsableAttribute, System.ComponentModel, at faster it Find ■B 746 BackColor property, 1008 Browser Applications (XBAPs), XAML, 1017–1018 BAML (Binary Application Markup Language), Browser controls, 736–737 986–987 browser statistics in HTTP Request processing, *.baml files, 986 ASP.NET, 858 base keyword in class creation, 156–157 Brush type, 1005 http://superindex.apress.com/ baseAddress key, 1031 brushes, 1012 BaseAddresses member, ServiceHost type, 1033 Brushes graphical service, WPF, 1010 BaseDirectory( ), System.AppDomain, 436 btnClickMe button, 1008–1009 BasePriority, ProcessThread type, 432 btnExitApp_Clicked( ) method, 984 BaseStream property, BinaryReader class, 538 bubbling events, 1008 BaseStream property, BinaryWriter class, 538 BufferedStream type, input/output, System.IO, string operations, 123–124 517 BasicHttpBinding binding class, WCF, 1024 bugs, description, 197 basicHttpBinding class, 1037 built-in style engine, 971 BeginCatchBlock( ) method, business process, 1047, 1053 System.Reflection.Emit.ILGenerator, 506 Button control BeginClose( ) member, ServiceHost type, 1033 AutoCheck property, 711 BeginExceptionBlock( ) method, CheckAlign property, 711 System.Reflection.Emit.ILGenerator, 506 Checked property, 711 BeginFinallyBlock( ) method, CheckState property, 711 System.Reflection.Emit.ILGenerator, 506 FlatStyle property, 709, 711 BeginInvoke( ) method, 453–458, 944 Image property, 709 BeginLabel( ) method, ImageAlign property, 709 System.Reflection.Emit.ILGenerator, 506 TextAlign property, 709 BeginLocal( ) method, ThreeState property, 711 System.Reflection.Emit.ILGenerator, 506 Button type, 981, 1072 BeginOpen( ) member, ServiceHost type, 1033