Index

Symbols

< > (angle brackets), 405

{ } (braces), 40, 57, 160

? (question mark), 162

_ (underline), 55

/ integer, 62

& operator, 62

+ operator, 62

A

accessors, 84, 86

Add Reference window, 122–123

Add-In Project Wizard, 372–383, 398

add-ins, 371–400

adding functionality to, 383–397

creating, 372–383

deploying, 397–399

general information, 372, 399–400

Analyze menu, 15

angle brackets < >, 405

anonymous types, 198–199, 206

API (application programming interface), 5

application icons, 120

application programming interface (API), 5

applications

artifacts, 116, 117, 136

building with ASP.NET MVC, 262–264

Click-Once, 120

COM, 121, 124, 134

compiling, 129–135

Console. See Console applications

including databases with, 253

Java, 300–301

Microsoft Office, 124

OOB, 294–297

output path, 134

Silverlight, 285–298

state of, 160–166

Web, 152–153

Windows Services, 33

WPF. See WPF

Architecture menu, 15

arguments, 75–78, 153

arrays, 62–63, 107–108

artifacts, 116, 117, 136

ASP.NET

deploying Web services, 315, 317, 325–326, 336

described, 250

ASP.NET MVC, 249–284

building applications, 264–284

creating Controllers, 254–256, 268–269

creating Models, 254

displaying Views, 256–261

managing routing, 262–264

MVC objects, 250–254, 270–276

overview, 250–251

starting ASP.NET MVC project, 251–254

ASP.NET MVC Project Wizard, 261

ASP.NET projects, 33

assemblies, 114, 119, 122–129

Assembly Information option, 118, 121–122

assembly name, 118, 119

assembly references, 122–129

associations, 201

authentication, 184, 319, 322

automatic properties, 85–86

Autos window, 160–161, 162

B

backing field, 85, 86

binding, 234–247

bookmarks, 44–45

braces { }, 40, 57, 160

branching statements, 57–61

breakpoints, 155–158

conditional, 172

creating, 156–157

customizing, 157–158

managing, 158

overview, 155

using, 171–173

bugs, 167–179. See also debugging

build event macros, 134

build order, 131–132

C

C# compiler, 133, 135

C# language

case sensitivity, 40, 53

code editor options, 46–47

considerations, 13

included with Visual Studio, 36

inheritance, 70

Intellisense, 50–51

popularity of, 36

primitive types, 53

vs. VB language, 13, 36, 115–116

C++ language, 31, 36, 154, 373

C# projects, 31, 33, 115–116, 150, 151. See also projects

Call Hierarchy feature, 148–150

call sites, 148–150, 163

Call Stack window, 163

Canvas layout, 225–226

capitalization issues, 40, 53

Cascading Style Sheets (CSS), 252, 344

case sensitivity, 40, 53

character sets, 174

child classes, 70, 71

child/parent relationship, 187–192, 206

Class Designer, 137–141

code generation, 138–141

using, 137–141

visualizing code with, 137–138

class libraries, 33, 36–38, 125–129

Class Library projects, 119, 124, 125–129

class locators, 44

class snippet, 71–72

class type, 68

Class view, 136

classes

child, 70, 71

creating, 68–72

creating for interfaces, 98–101

custom definitions, 68–70

debugging and, 148

finding, 44

inheritance, 70–72

instantiating objects from, 69

parent, 70

Program, 41–42

snippets, 71–72

syntax, 68–70

WCF, 308–314

cleaning solutions/projects, 130–131

click events, 228–234, 246

Click-Once applications, 120

CLR (Common Language Runtime), 154

code. See also programming languages;

programs automatically generated, 4–5

breakpoints in. See breakpoints

Call Hierarchy feature, 148–150

call sites, 148–150, 163

in class libraries, 126–129

debugging. See debugging

generating with Class Designer, 138–141

hierarchical model, 114–115

IntelliTrace, 165–166

for interfaces, 101–106

managed, 154

on McGraw-Hill Web site, 103

Pin To Source feature, 164–165

reusing, 149

skeleton, 4–5, 39–43

snippets. See snippets

stepping through, 158–159

unmanaged, 154

unsafe, 133, 134

using in class libraries, 126–129

visualizing with Class Designer, 137–138

code editor. See VS Code editor

code libraries. See class libraries

code-behind file, 228–234

coding, 49–66. See also specific languages

branching statements, 57–61

classes. See classes

debugging. See debugging

enums, 55–57

expressions. See expressions

Intellisense. See Intellisense

methods. See methods

primitive types, 52–54

running programs, 51–52

snippets. See snippets

tools for, 148–150

VS features, 4–5

Web service calls, 329–336

collections

advantages of, 110

generic, 107–110

object, 194–197

vs. arrays, 62–63

color schemes, 25

COM (Component Object Model) applications, 121, 124, 134

COM Interop, 133, 134

COM objects, 124

ComboBox control, 241–243

command-line arguments, 153

Common Language Runtime (CLR), 154

compiler constants, 150

compilers

assembly references, 123

C#, 133, 135

considerations, 4, 86, 96

errors/warnings, 123, 134, 204, 344

optimizations, 150, 152

settings, 133–135

VB, 134–135

compiling applications, 129–135

Component Object Model. See COM

compression, 131

computation expressions, 54

conditional breakpoints, 172

Connect class, 378–383

Console applications

creating, 37–39, 115–116

debugging, 144–179

described, 32, 36

skeleton code, 39–43

context sensitivity, 16

Control Libraries, 33

controls. See also specific controls

Silverlight, 290–293

WPF, 226–234

.cs extension, 68

CSS (Cascading Style Sheets), 252, 344

custom types, 52

Customer class, 167

CustomerRepository class, 168–171

D

data, 181–214. See also databases

adding to tables, 186–187

binding, 234–247

dirty, 173

displaying in grid, 244–247

handling with LINQ to SQL, 200–214

querying with LINQ, 194–214

reading/saving, 243–244

working with in WPF, 234–247

data model, 200

data sources, 234–241, 244

database diagram, 190–192

database projects, 34

databases, 182–194. See also data

authentication, 184

connections to, 183–184

creating, 183–184

including with applications, 253

Server Explorer, 182–193

settings, 193–194

stored procedures, 192–193

tables. See tables

DataGrid option, 244–247

Debug class, 133–134

DEBUG compilation constant, 133–134, 150

Debug configurations, 150, 153

Debug mode

configuring, 150–155

running programs in, 156, 171

starting programs in, 156, 171

Debug Output folder, 151, 152

debug properties, 152–155

debugging, 143–180

application state, 160–166

Call Hierarchy feature, 148–150

Call Stack, 163

configuring Debug mode, 150–155

described, 51

evaluating expressions, 151–152, 162

finding bugs, 171–174

fixing bugs, 174–175

history, 166

null reference exceptions, 175–179

properties, 150–155

on remote machines, 153–154

running applications, 152–153

running programs with debugging, 52

running programs without debugging, 51

sample program with bugs, 167–179

starting programs in Debug mode, 156, 171

stored procedures, 154

VS Debugger, 166–179

.vshost files, 151–152

Web applications, 152–153

delegates, 90, 94–96. See also events

Delphi language, 5

dependencies, 131–133

development-time code tools, 148–150

diagnostic events, 165–166

directories

Create Directory, 116

name, 317

physical, 328

virtual, 315

dirty data, 173

.dll extension, 119, 124

do loops, 65–66

docking windows, 18–19

DockPanel layout, 223–224

documentation, 11

Dynamic Data projects, 33

E

Edit menu, 14

elements

accessing, 110

in arrays, 107–108

as classes, 411

in generic lists, 109–110

property, 412–414

else snippets, 58–59

else statements, 58–59

Enable Managed Code option, 154

endless loops, 157

enums, 55–57

environment

IDE, 4, 13

macros, 134, 342, 360–370

snippets. See snippets

templates. See templates

environment settings

considerations, 13

default, 11, 12–13, 28–30, 31

exporting, 23–24

importing, 24–28

modifying, 13, 22–30

resetting, 28–30

errors. See also warnings

compiler, 123, 134, 204, 344

considerations, 134

controllers, 278

null reference exceptions, 93, 175–179

vs. warnings, 134

event handlers, 91, 95–96, 228–234

event keyword, 93

EventHandler class, 94–95

events, 91–93. See also delegates

click, 228–234, 246

code completion for, 95–96

described, 90, 91

diagnostic, 165–166

example, 91–93

handling, 228–234

null, 93

use of, 91–93, 95

.exe extension, 119

Exec method, 391–395

Export Template Wizard, 346

expressions

branching, 57–59

considerations, 49

described, 54

evaluating during debugging, 151–152, 162

performing computations, 54

primitive types, 54

viewing, 163–164

Extensible Markup Language. See XML

F

F# language, 31, 36

false/true conditions, 55, 57, 62

fields

backing, 85, 86

considerations, 81, 83

declaring, 81–83

described, 69, 81

example of, 68, 69

using, 81–83

vs. properties, 83

file locks, 154

File menu, 14

File Properties window, 122

File Transfer Protocol (FTP), 315, 317, 319

files

code-behind, 228–234

compressing, 131

.dll, 124

hidden, 117–118

log, 7, 166

.pdb, 151

project, 116–121

.vshost, 151–152

XML, 134

floating windows, 19–20

folders

hierarchy of, 116–118

projects, 116–118

snippets, 358–359

solutions, 116–118

for loops, 61–64

foreign keys, 187–192

FTP (File Transfer Protocol), 315, 317, 319

G

GAC (Global Assembly Cache), 122–123

generic collections, 107–110

generic lists, 109–110

get accessors, 84, 86

Global Assembly Cache (GAC), 122–123

Global.asax file, 253

Globally Unique Identifier (GUID), 121

graphical user interface (GUI), 95

Grid layout, 220–222

GUI (graphical user interface), 95

GUID (Globally Unique Identifier), 121

H

Help menu, 15

hidden files, 117–118

HTML (Hypertext Markup Language)

considerations, 260

helper methods, 272–273, 278

viewing code, 256–261

XHTML, 404

I

.ico extension, 120

Icon setting, 118, 120

icons, 16–17, 120, 236, 295

IDE (integrated development environment), 4, 13

if snippets, 58–59

if statements, 57–59

IIS (Internet Information Server), 314–326

immediate if operator, 55

Immediate window, 162

impedance mismatch, 201

Implements keyword, 101

Import and Export Settings Wizard, 22–32, 45

Imports directive, 129

indicator margin, 44

inheritance, 70–72

instance methods, 74–75

instances, 40–41, 129, 148

int type, 78, 80

Integer keyword, 54

integrated development environment (IDE), 4, 13

Intellisense

C# options, 50–51

Consume First mode, 47

described, 5

saving keystrokes with, 49–51

snippet completion lists, 47, 49, 50

Standard mode, 47

switching between modes, 47

using, 49–51

writing expressions, 163

IntelliTrace window, 165–166

interface snippets, 106

interfaces, 96–106

creating, 97

creating classes for, 98–101

modifying, 97

overview, 96

WCF, 302–308, 377–383, 389

writing code for, 101–106

Internet Information Server (IIS), 314–326

item templates, 347–353

items. See project items

J

Java applications, 300–301

JavaScript, 253, 257, 272, 288

joins, 205–209

K

keyboard shortcuts, 15, 44, 47

keywords, 47

L

Language Integrated Query. See LINQ

languages

C#. See C# language

C++, 31, 36, 154, 373

Delphi, 5

F#, 31, 36

HTML. See HTML

included with VS 2010, 36

Visual Basic. See VB

WSDL, 301

XAML. See XAML

XML. See XML

libraries. See class libraries

library files. See assemblies

license key, 8

licensing terms, 7–8

LINQ (Language Integrated Query), 186, 194–214

LINQ projections, 198–199

LINQ to SQL, 200–214

creating items, 305

deleting data, 212–214

inserting data, 210–211

multiple tables, 205–210

overview, 200

querying, 203–210

setting up, 200–201

updating data, 211–212

WPF applications, 246–247

LINQ to SQL Designer, 200–203

LINQ to SQL Wizard, 200, 205

ListBox control, 241–243

lists, generic, 109–110

local variables, 81

Locals window, 160–161, 162

log files, 7, 166

loops, 61–66

endless, 157

for, 61–64

while, 64–65

M

Macro Editor, 365–370, 374, 380

Macro Explorer, 364–365

macros, 134, 342, 360–370

Main method, 40–41, 49, 120

manifest, 120–121

Manifest setting, 118, 120–121

markup extensions, 414–416

MasterPages, 257–260, 270, 273

mathematical operators, 54

McGraw-Hill Web site, 103

member locators, 44

Memory window, 173

menu bar, 14–15

method results, 78–80

methods, 72–80. See also specific methods

adding parameters to, 75–78

calling, 72–75

declaring, 72–75

delegates. See delegates

events. See events

instance, 74–75

naming, 40–41, 231

overview, 72

private, 74

public, 74

returning values from, 78–80

shared, 74

snippets, 80

static, 41, 74

using, 72–75

Microsoft Developer Network (MSDN), 6, 326

Microsoft Office applications, 124

Microsoft Office projects, 34

Model View Controller. See ASP.NET MVC

MSDN (Microsoft Developer Network), 6, 326

MVC objects, 250–254, 270–276. See also ASP.NET MVC

N

namespace snippet, 47–48

namespaces

assembly references and, 122

default, 116, 119, 328, 406

overview, 42–43

Root, 119

setting, 119

VB, 43

XML, 406–407

naming conventions, 40–43, 116, 231

.NET assembly references, 123–124

.NET CLR. See CLR

.NET Framework, 38, 90, 119, 124, 320

.NET Framework Class Library, 13

.NET types, 53–54

New Project window, 37, 115–116

New Project Wizard, 39, 253

null events, 93

null reference exceptions, 93, 175–179

null values, 176–179

O

object collections, 194–197

objects

COM, 124

creating, 139

debugging and, 148

instantiating from classes, 69

MVC, 250–254, 270–276

Office applications, 124

Office project types, 124

Office projects, 34

OnConnection method, 384–391

OOB (Out-of-Browser) functionality, 294–297

operating systems. See specific Windows systems operators

immediate if, 55

mathematical, 54

ternary, 55, 57

optimization, 131

Options menu item, 15

Options window, 45, 46, 154–155

Other Windows menu item, 14

Out-of-Browser (OOB) functionality, 294–297

Output type, 119–120

Output Type setting, 118, 119–120

P

parameters, 75–78

parent classes, 70

parent/child relationship, 187–192, 206

.pdb files, 151

Pin To Source feature, 164–165

primary keys, 186–189, 191, 201

primitive types, 52–54

private modifier, 83

private variables, 85

product key, 8

Program class, 41–42, 44, 137

programming languages. See also languages

C#. See C# language

C++, 31, 36, 154, 373

Delphi, 5

F#, 31, 36

included with VS 2010, 36

Visual Basic. See VB

programs. See also code

debugging, 52, 156, 171

pausing execution of, 157

running, 51–52

project items, 21, 86, 116

Project Properties window, 118–122

projections, 198–199

projects. See also solutions

adding to solutions, 117–118

artifacts, 116, 117, 136

ASP.NET MVC. See ASP.NET MVC

“bare bones, ” 36–39

build order, 131–132

building/rebuilding, 129–130

C#, 31, 33, 115–116, 150, 151

C# vs. VB, 115–116

Class Designer visualization, 137–138

Class Library, 119, 124, 125–129

cleaning, 130–131

compiler settings, 133–135

Console. See Console applications

creating, 36–39, 115–116

database, 34

deleting, 116

dependencies, 131–133

folders, 116–118

hidden files, 117–118

hierarchical relationships, 116–118

location, 37

Microsoft Office, 34

modifying, 343–344

naming/renaming, 37, 115–116, 119, 126

navigating with Class view, 136

new, 31–32

optimizing, 131

organizing principles, 114–115

overview, 31–32

property settings, 118–122

recent, 116

referencing assemblies, 122–129

resetting references, 126

saving as templates, 344–346

searching for, 38

SharePoint, 34

Silverlight, 285–298

sorting, 38

templates for. See templates

types of, 30–34

viewing available, 30–32

viewing with Class Designer, 137–141

WCF. See WCF

web, 33, 286

Windows Projects, 32–33

WPF. See WPF

properties

accessors, 84

automatic, 85–86

debug, 150–155

declaring, 81–86

described, 81

example of, 83–84

projects, 118–122

setting, 228

using, 81–86

vs. fields, 83

Properties folder, 117, 118

Properties window, 118–122, 139, 227–233

property elements, 412–414

property snippet, 86

public access modifier, 74

Q

queries. See also LINQ to SQL

on multiple tables, 205–210

object collections, 194–197

stored procedures, 192

QueryStatus method, 395–397

question mark (?), 162

Quick Watch window, 163–164

R

refactorings, 5

Reference Paths, 125

references

adding to COM objects, 124

assembly, 122–129

class libraries, 125–126

external .dll files and, 124

resetting, 126

Release configurations, 150, 153

releases, 6, 11, 12

remote debugging, 153–154

repository, 265–268, 282

resources, referencing, 414–416

Resources option, 121

Root namespace, 119

routing, 262–264

S

scope, 160–161

search features, 38, 158

select statement, 59–60

serialization assemblies, 133

Server Control projects, 33

Server Explorer, 182–193

service reference, 326–334

service releases, 6, 11, 12

set accessors, 84, 86

shared methods, 74

shared modules, 41

SharePoint projects, 34

shortcut keys, 15, 44, 47

Silverlight, 285–298, 326, 336. See also XAML

Silverlight applications, 285–298

skeleton code

automatically generated, 4–5

Console application, 39–43

.snippet extension, 354

snippets

class, 71–72

creating, 353–358

do loops, 65–66

else, 58–59

examining, 354–356

for each loops, 63–64

for loops, 62

if statements, 58–59

interface, 106

library of, 358–359

method, 80

namespace, 47–48

overview, 47–48

pick list, 47

property, 86

switch statement, 60–61

using, 47–48

while loops, 64–65

snippets folders, 358–359

Snippets Manager, 359

Solution Explorer, 116–118

Console application creation, 38

managing build order, 131–132

managing dependencies, 131–133

opening/closing items, 21

overview, 16

working with controls, 227

solution folders, 116–118

solutions. See also projects

adding projects to, 117–118

artifacts, 116, 117, 136

building/rebuilding, 129–130

cleaning, 130–131

contents, 38–39

described, 38

folders, 116–118

hierarchical relationships, 116–118

naming, 115–116

organizing principles, 114–115

showing, 116–117

sorting/searching features, 38, 158

source code. See code

source control, 116

SQL. See LINQ to SQL

StackPanel layout, 222–223

Start page, 15

Startup object, 118, 120

statements

branching, 57–61

considerations, 49

else, 58–59

if, 57–59

using Intellisense with, 49–51

static keyword, 40

static methods, 41, 74

Status bar, 16

Step Over operation, 159

stored procedures

databases, 192–193

debugging, 154

in LINQ to SQL, 209–210

Sub Main method, 40

switch statement, 59–61

switch statement snippets, 60–61

system icons, 120

System namespace, 42, 43

system requirements, 6

T

tabbed windows, 20–21

tables

adding data to, 186–187

adding to databases, 185–187

considerations, 201, 202

foreign keys, 187–192

multiple, 187–192, 205–210

performing queries on, 205–210

target framework, 119

Target Framework setting, 118, 119

Team Foundation Server (TFS), 15

Team menu, 15

templates

creating, 343–347

exporting, 344–346

implementing, 342–353

item, 347–353

options, 345–346, 352–353

overview, 342–343

saving projects as, 344–346

ternary operator, 55, 57

Test menu, 15

TFS (Team Foundation Server), 15

title bar icons, 16, 17

toolbar, 15

Toolbox

Class Designer, 138–139

general information, 16–20

working with controls, 227–228

Tools menu, 15

Trace class, 133–134

TRACE compilation constant, 133–134, 150

true/false conditions, 55, 57, 62

types. See also specific types

anonymous, 198–199, 206

class, 68

considerations, 41

custom, 52

described, 68

.NET, 53–54

Office projects, 124

primitive, 52–54

U

UAC (User Account Control), 120

underline (_), 55

Until condition, 65

Until keyword, 65

User Account Control (UAC), 120

user interface, 226, 234, 251, 404

using directives, 43, 129

V

value keyword, 84

values

null, 176–179

returning from methods, 78–80

variables

application state, 160–166

described, 52

local, 81

primitive types, 52–54

private, 85

in scope, 160–161

watching in Watch window, 161–162

watching with Pin To Source, 164–165

VB (Visual Basic.NET)

considerations, 13

inheritance, 70

popularity of, 36

primitive types, 53

vs. C# language, 13, 36, 115–116

VB compiler, 134–135

.vb extension, 68

VB namespaces, 43

VB projects. See also projects

assembly references, 124

naming, 116

target framework, 119

vs. C# projects, 115–116

VBA (Visual Basic for Applications), 34

View menu, 14

Views, 256–261

virtual directories, 315

Visual Basic for Applications. See VBA

Visual Basic.NET. See VB

Visual Designer, 191, 220, 227, 228

Visual Studio 2010. See VS 2010

Visual Studio Hosting Process, 154

Visual Studio projects, 30–34. See also projects

void keyword, 40, 74

VS (Visual Studio) 2010

add-ins. See add-ins

described, 4

documentation, 11

installing, 6–13

interface, 13–16

languages included with, 36

license key, 8

licensing terms, 7–8

managing windows, 16–21

modifying environment settings, 22–30

navigating, 13–16

privacy statement, 7

product key, 8

releases, 6, 11, 12

restoring default settings, 28–30, 31

starting, 13–14

system requirements, 6

versions, 6, 7

VS Code editor, 45–48

VS Debugger, 166–179

VS editor, 5

VS Recent Projects list, 116

VS2010ImageLibrary file, 120

.vshost files, 151–152

W

warnings, 23, 134, 189, 190. See also errors

Watch windows, 161–162

WCF (Windows Communication Foundation), 299–338. See also Web Services

communicating with WCF services, 326–338

hosting WCF services, 314–326

overview, 300–301

starting WCF projects, 301–314

WCF classes, 308–314

WCF contract, 302–308

WCF projects, 301–314

WCF services. See Web services

Web applications

building controllers, 254–256

creating, 251–254

creating models, 254

customer management, 264–284

debugging, 152–153

displaying views, 256–261

managing routing, 262–264

portal-style, 34

web projects, 33, 286

Web Service Description Language (WSDL), 301

Web services, 299–338. See also WCF

adding to Web sites, 337–338

communicating with, 326–338

hosting on IIS, 314–326

overview, 300–301

proxies, 328–333

used by clients, 336–337

Web Services projects, 33

Web sites

adding Web services to, 337–338

creating on IIS, 315, 317–321

deploying Silverlight applications to, 297–298

deploying Web services, 315, 317, 325–326, 336

web.config file, 253

while loop snippets, 64–65

while loops, 64–65

Win32 resources file, 121

windows, managing, 16–21

Windows 7 systems, 6, 34, 315–317

Windows 2003 systems, 6

Windows 2008 systems, 6, 34, 300, 321

Windows Application projects, 119, 120

Windows Communication Foundation. See WCF

Windows Forms, 32, 219

Windows menu, 15

Windows Presentation Framework. See WPF

Windows Projects, 32–33

Windows Services, 33

Windows versions, 6

Windows Vista systems, 6, 34

Windows XP systems, 6, 34

wizards

Add-In Project Wizard, 372–383, 398

ASP.NET MVC Project Wizard, 261

Export Template Wizard, 346

Import and Export Settings Wizard, 22–32, 45

LINQ to SQL Wizard, 200, 205

New Project Wizard, 39, 253

options for, 5

work area, 15

working directory, 153

WPF (Windows Presentation Framework), 217–247

binding data, 234–247

Click-Once applications, 120

controls, 226–234

layouts, 220–226

output types, 120

starting projects, 218–220, 410–411

working with data in, 234–247

XAML. See XAML

WrapPanel layout, 224–225

WSDL (Web Service Description Language), 301

X

XAML (XML Application Markup Language), 409–416

attributes, 411

considerations, 218

controls, 227

elements, 411

markup extensions, 414–416

overview, 410

property elements, 412–414

Silverlight projects, 286–290

starting WPF projects, 218–220, 410–411

WPF controls, 228

XAML documents, executing, 411–412

.xaml extension, 227

XHTML (XML for HTML), 404

XML (Extensible Markup Language)

introduction to, 403–407

WCF services, 300–301, 330

XML Application Markup Language. See XAML

XML documentation file, 134

XML Editor, 356, 404

XML files, 134

XML for HTML (XHTML), 404

XML menu, 407

XML serialization, 134

XML Transformation (XSLT), 407

XSLT (XML Transformation), 407

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.141.6