D


data access with .NET. See ADO.NET; viewing .NET data; Visual Studio .NET and data access

data adapters

deleting rows with, 623

flexibility of, 621

inserting new rows with, 621–623

populating a DataSet with stored procedure in, 619–620

UpdateRowSource property and, 622–623

updating existing rows with, 623

data binding. See also DataGridView control; event-booking application

Binding class, 819–820

BindingContext class, 818–819

class hierarchy for objects, 817–818

CurrencyManager class, 819, 820–822

data display with templates, 935–936

data-binding objects, 817–822

DataGridView control capabilities, 801–802

defined, 816

Dialog Data Exchange (DDX) versus, 816–817

PropertyManager class, 819, 820–822

ScrollingDataBinding example, 821–822

simple binding, 816–817

Web Forms and, 926–939

data members of classes, 85–86. See also constants; events; fields (member variables)

data types. See also reference types; UDTs (user-defined types); value types; specific types

blittable, 638

casting, 143–145

COM, 1155

CTS and, 10–12, 40–41

enumerations, 55–57

explicit conversions, 142–145

hierarchy of, 11–12

implicit conversions, 141–142

modifiers and, 124–125

namespaces for, 21, 59

naming generic types, 274

nesting, 125

nullable types, 139, 142, 144, 301–302

pointers and, 208

predefined, 41–46

primitive types as .NET structs, 40–41

strong typing in IL, 9–16

strongly typed resources, 531–533

type library for COM, 1173–1175

type safety, 7, 134, 140–146

user-defined casts, 157–169

value types versus reference types, 9, 39–40

variable declarations and, 34

for Web services, 990

data Web server controls (ASP.NET)

data display controls, 918

data source controls, 917–918

templates with, 935–939

database access. See ADO.NET; viewing .NET data; Visual Studio .NET and data access

database connections

closing with ADO.NET, 583, 585–588

creating with Visual Studio .NET, 822–825

ensuring resources are released, 583–588

managing connection strings with ADO.NET, 584–585

opening with ADO.NET, 583

database server. See SQL Server 2005

DatabaseResourceManager class, 548–549

DatabaseResourceReader class

client application for, 549

creating, 546–547

database columns and values for example, 545–546

DatabaseResourceSet class, 547–548

DataColumn class

generated for XSD schema, 831–832

naming conventions for columns, 629

overview, 602–603

DataGrid control

DataGridView control versus, 801

getting selected row with, 839–840

DataGridView control

for array data display, 804–805

binding capabilities, 801–802

class hierarchy, 813–816

constructing columns for, 814–816

DataGrid control versus, 801

DataGridViewColumn objects utilized by, 814

DataMember property, 804

for DataSet display, 809–811

DataSource property capabilities, 803

for DataTable display, 805

for DataView display, 806–809

DisplayTabularData application, 802–803

for generic collection display, 811–813

IListSource and IList interfaces with, 811

DataList control, 937–938

DataRow class

altering data, 605–606

generated for XSD schema, 830–831

overview, 603–604

for pop-up menu for a database row, 832

RowState property, 605

versioning by, 604–605

DataSet class. See also DataColumn class; DataRow class ;DataTable class

converting relational data to XML, 694–696

converting single table data to XML, 689–694

converting XML to ADO.NET data, 696–699

copying a DataSet, 625–626

data columns, 602–603

data constraints, 609–612

data relationships, 608–609

data rows, 603–606

data tables, 601–602

DataGridView control for displaying data, 805, 809–810, 814–816

DataViewManager for displaying data, 810–811

overview, 600–601

persisting DataSet changes, 620–625, 691–692

populating a DataSet, 619–620

ReadXml() method, 620, 696–697

ReadXmlSchema() method, 697

Recordset object versus, 609

schema generation, 606–608, 691

tiered development and, 625–626

Web services with DataSet objects, 997

WriteXml() method, 624–625, 690–691

writing XML output, 623–625, 690–691

DataSource property (DataGridView control)

arrays as data source for, 804–805

capabilities, 803

DataSet class as data source for, 809–811

DataTable class as data source for, 805

DataView object as data source for, 806–809

generic collections as data source for, 811–813

DataTable class

binding column to TextBox, 816–817

creating DataView from existing DataTable, 806

data-access methods, 835–837

DataGridView control for displaying data, 805

generated for XSD schema, 829–830

naming conventions for tables, 629

overview, 601–602

for pop-up menu for a database row, 832

properties of objects, 602

setting a foreign key, 610–611

setting a primary key, 610

setting update and delete constraints, 611–612

DataView object, 806–809

DataViewManager, displaying DataSet data in, 810–811

date formatting

for DateTimePicker control, 767

for globalization, 519–520

DateTime structure, 519

DateTimePicker control (Windows Forms)

hosting on a ToolStrip, 777–779

overview, 765

DCOM protocol, 1126

DCs (device contexts) of GDI+, 843–844

DDX (Dialog Data Exchange), 816–817

deadlocks, avoiding, 361–363, 364

debugging

COM issues for, 9

configuration files (.NET Remoting), 1046–1047

debug builds for, 399–401

exceptions and, 406–407

graphics and, 855–856

removing debugging commands (Visual Studio), 401

setting breakpoints, 404

symbols in Visual Studio, 400–401

Visual Studio 2005 debugger for, 9, 373, 404–407

Watch window for (Visual Studio), 405–406

Windows Services, 1301–1302

decimal type

overview, 42–43

placeholder characters for output, 67

declarative security

for code access, 488

role-based, 509–510

declaring. See also instantiating

abstract classes and functions, 117

constants, 38, 85

custom generic classes, 293

delegates, 173–174

enumerations, 55, 56

events, 188

methods, 86–87

permissions (declarative security), 488

pointers, 206–207

properties, 93

role-based security, 509–510

sealed classes and methods, 117–118

user-defined casts, 158–159

variables, 33–34

virtual methods, 114

virtual properties, 114

#define preprocessor directive, 70, 71

defining. See declaring

delegates. See also events

with anonymous methods, 176–185

with asynchronous .NET Remoting, 1053–1054

BubbleSorter example, 180–182

for COM, 1181

declaring, 173–174

delegateTest example, 176–177

EventHandler example, 186–188

EventHandler<TEventArgs> generic delegate, 302–303

for events, 185

generic, 299–301

instantiating, 173–174, 176–177

interfaces and, 181

multicast, 183–185

in .NET Framework, 188

passing without parameters, 179

proxy class for, 838

SimpleDelegate example, 177–180

syntax, 173

for threading, 352, 353, 366

type safety and, 172, 174

uses for, 171–172

using, 174–176

delegateTest delegate, 176–177

Delete() method, 1197

deleting or removing

array list elements, 251–253

code groups, 494

database records with ADO.NET, 591, 595–596

database rows with data adapters, 623

debugging commands with Visual Studio, 401

dictionary items, 261

files, 1197–1201

folders, 1197

method calls from multicast delegates, 183

setting delete constraints for databases, 611–612

demanding permissions, 478, 479–480

denying permissions, 485–486

deployment

automatic, for Enterprise Services components, 1073

ClickOnce technology for, 553, 567–576

Copy Web tool for, 552, 555

designing for, 551–552

including deployment project in applications solution, 563–564

installing client from Web server, 566–567

manual, for Enterprise Services components, 1073–1074

No Touch Deployment (NTD), 566–567

options available to .NET developers, 552–553

publishing Web sites for, 552, 555–556

requirements, 553

simple deployment, 554–556

simple Web application installer, 564–565

of triggers for SQL Server, 650

of UDTs, 642

of user-defined aggregates, 645

Windows Installer for, 552, 556–567

xcopy for, 552, 554–555

Dequeue() method (Queue class), 256

derived classes

calling base versions of methods, 116–117

casts between, 162–163

casts between base and derived classes, 163–164

commas in declarations, 113

constructors, 118–124

instantiating, 120

from interfaces, 126–127

Object class as parent of all classes, 106

syntax, 113

derived interfaces, 131–132

derived structs, 113

Design View window (Visual Studio 2005), 391–394

destructors. See finalizers

device contexts (DCs) of GDI+, 843–844

device coordinates, 863

DHTML versus ASP.NET, 22

Dialog Data Exchange (DDX), 816–817

dictionaries

adding objects to, 261, 262

algorithm for, 260, 262–263

defined, 259

getting details from, 259–260, 261

Hashtable class for, 261–262

how they work, 262–264

key class for, 262–263

keys, 260, 262

MortimerPhonesEmployees example, 264–269

in .NET, 261–262

overriding Equals method for, 264, 266

overriding GetHashCode() method for, 263–264,266–267

performance compared to array lists, 259

real-life dictionaries compared to, 260

removing items from, 261

requirements for building, 260

uses for, 259, 260

DiffGram documents

defined, 699

reading, 700–701

uses for, 699

writing, 699–700

digital certificates

applying FullTrust permission to assemblies, 502

buying versus creating, 499

checking code groups for your assembly, 503–504

configuring the test certificate, 501

creating a test certificate, 499

distributing code using, 499–504

getting a hexadecimal representation, 502

signing assemblies with, 499–501

verifying the trust level, 501, 503

directories. See folders or directories

Directory class

Delete() method, 1197

described, 1188

DirectoryInfo class versus, 1189

Move() method, 1197

Directory Services Markup Language. See DSML

DirectoryEntries class, 733

DirectoryEntry class

binding Active Directory with, 729

CommitChanges() method, 733, 734

RefreshCache() method, 733

DirectoryInfo class

Delete() method, 1197

described, 1188

Directory class versus, 1189

Exists property, 1189–1190

instantiating, 1189

methods, 1191–1192

properties, 1190, 1191

streams versus, 1206

DirectorySearcher class

filters, 736–737

LDAP provider required for, 736

PropertiesToLoad, 737

read-mostly access and, 736

SearchRoot, 736

SearchScope, 737

setting search limits, 737–740

DisableMoveFeatures utility function, 1201

dispatch interfaces (COM), 1153–1154

DisplayAtStartup example, 844–847

DisplayFileInfo() method, 1194–1195, 1196

DisplayFolderList() method

FileProperties application, 1195, 1196, 1197

FilePropertiesAndMovement application, 1200–1201

DisplayImage project, 871–873

displaying images

example, 870–873

issues when manipulating images, 873–874

DisplayNames() method, 525

DisplayTabularData application, 802–803

DisplayText example, 874–876

DisplayTypeInfo() method, 322–323

Dispose() method

ColdCallFileReader class, 344, 345–346

Component class, 755

Form1 class, 872

IDisposable interface, 201–202

distinguished name (DN) in Active Directory, 727–728, 729

distributed identity of remote objects, 1017

distributed programming's future. See WCF; Web

services specifications

distributed transactions (Enterprise Services), 1068

distributing code

certificates for, 499–504

strong names for, 497–499

DLLs

assemblies as answer to DLL Hell, 412–413

problems with (DLL Hell), 411–412

side-by-side feature for, 412

DN (distinguished name) in Active Directory, 727–728, 729

Dns class, 1260–1261

DNS servers

Dns class, 1260–1261

DnsLookup application, 1261–1262

IP addresses and, 1259

DnsLookup application, 1261–1262

Document class

LinkedList<T> generic class example, 287, 289

Queue<T> generic class example, 284

document management applications

using custom generic class, 293–296

using LinkedList<T> generic class, 287–292

using Queue<T> generic class, 283–286

DocumentManager class

custom generic class example, 293–294

Queue<T> generic class example, 284–285

DocumentTitleChanged event, 1248–1249

DOM (document object model)

using MSXML 4.0 in .NET, 661–663

XmlDocument class as implementation of, 659, 673

DotnetComponent class, 1172–1173, 1175, 1181–1182

double quotes ("), string literals enclosed by, 46

double type, 42

do...while statements, 53–54

DownloadFile() method (WebClient class), 1240

DrawEllipse() method, overloading, 845

DrawImage() method (Graphics class), 874

DrawImageUnscaled() method (Graphics class), 873

drawing. See also graphics

lines, 868–870

scrollable windows, 856–862

shapes, 844–847, 868–870

text, 874–880

DrawRectangle() method, overloading, 845

DrawString() method (Graphics class),

874, 875–876

DriveInfo class, 1188, 1220–1222

drives, reading information from, 1220–1222

DSML (Directory Services Markup Language)

configuration scenario for Active Directory, 745–746

namespace for, 724, 745

searching Active Directory objects with, 746–748

standardized Web interfaces for, 724

System.DirectoryServices.Protocols classes, 746

dual interfaces (COM), 1154

durability of Enterprise Services transactions, 1078




Professional C# 2005
Pro Visual C++ 2005 for C# Developers
ISBN: 1590596080
EAN: 2147483647
Year: 2005
Pages: 351
Authors: Dean C. Wills

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net