Wonder Club world wonders pyramid logo
×

Visual Basic 2010 Unleashed Book

Visual Basic 2010 Unleashed
Visual Basic 2010 Unleashed, Foreword by Beth Massi Senior Program Manager, Microsoft Visual Studio
<i>Visual Basic 2010 Unleashed</i> is the most comprehensive, practical reference to modern object-oriented programming with Visual Basic 2010. Written by Visual Basic MVP Alessandr, Visual Basic 2010 Unleashed has a rating of 4 stars
   2 Ratings
X
Visual Basic 2010 Unleashed, Foreword by Beth Massi Senior Program Manager, Microsoft Visual Studio Visual Basic 2010 Unleashed is the most comprehensive, practical reference to modern object-oriented programming with Visual Basic 2010. Written by Visual Basic MVP Alessandr, Visual Basic 2010 Unleashed
4 out of 5 stars based on 2 reviews
5
50 %
4
0 %
3
50 %
2
0 %
1
0 %
Digital Copy
PDF format
1 available   for $99.99
Original Magazine
Physical Format

Sold Out

  • Visual Basic 2010 Unleashed
  • Written by author Alessandro Del Sole
  • Published by Sams, May 2010
  • Foreword by Beth Massi Senior Program Manager, Microsoft Visual Studio Visual Basic 2010 Unleashed is the most comprehensive, practical reference to modern object-oriented programming with Visual Basic 2010. Written by Visual Basic MVP Alessandr
  • Foreword by Beth Massi Senior Program Manager, Microsoft Visual StudioVisual Basic 2010 Unleashed is the most comprehensive, practical reference to modern object-oriented programming with Visual Basic 2010. Written by Visual Basic MVP Alessandro Del So
Buy Digital  USD$99.99

WonderClub View Cart Button

WonderClub Add to Inventory Button
WonderClub Add to Wishlist Button
WonderClub Add to Collection Button

Book Categories

Authors

Part I Learning the Basics of VB

1 Introducing the .NET Framework 4.0 1

What Is the .NET Framework?........................................................................1

Where Is the .NET Framework ..............................................................2

The .NET Framework Architecture ........................................................2

The Common Language Runtime ..................................................................4

Writing Managed Code .........................................................................4

.NET Assemblies.....................................................................................5

The Base Class Library ....................................................................................5

.NET Languages...............................................................................................6

.NET Framework Tools ....................................................................................7

Windows Software Development Kit ....................................................7

What’s New in .NET Framework 4.0 ..............................................................8

2 Getting Started with the Visual Studio 2010 IDE 11

What’s New in Visual Studio 2010 ...............................................................11

Start Page.......................................................................................................12

Get Started Tab ....................................................................................13

The Guidance and Resources Tab........................................................13

The Latest News Tab ............................................................................14

Working with Projects and Solutions...........................................................15

Creating Visual Basic Projects .............................................................16

Multitargeting......................................................................................17

Accessing Recent and Online Templates.............................................18

Searching for Installed Templates .......................................................20

Creating Reusable Projects and Items Templates................................21

Creating Your First Visual Basic 2010 Project .....................................21

Finding Visual Basic Projects...............................................................23

Working with the Code Editor............................................................24

Working with Tool Windows........................................................................26

The Solution Explorer Window...........................................................27

Error List Window ...............................................................................28

The Properties Window .......................................................................30

Output Window...................................................................................31

My Project .....................................................................................................31

Application Tab....................................................................................33

Compiling Projects .......................................................................................37

Debug and Release Configurations .....................................................38

Other Compile Options.......................................................................41

Advanced Compile Options ................................................................44

Debugging Overview.....................................................................................47

Debugging an Application...................................................................47

Breakpoints and Data Tips ..................................................................49

About Runtime Errors..........................................................................52

Edit and Continue ...............................................................................53

Browsing the Visual Basic and .NET Documentation..................................54

Online Help and the MSDN Library ...................................................55

Object Browser Window......................................................................55

3 The Anatomy of a Visual Basic Project 59

Brief Overview of Types and Members.........................................................59

Classes ..................................................................................................60

Properties .............................................................................................60

Methods ...............................................................................................60

Modules ...............................................................................................61

Structures .............................................................................................61

Inheritance...........................................................................................61

Namespaces..........................................................................................62

Accessing Members..............................................................................63

Imports Directives................................................................................64

#Region..#End Region Directives........................................................64

Attributes .............................................................................................65

A New Feature: Implicit Line Continuation .......................................65

Visual Basic 2010 Reserved Keywords ..........................................................67

Understanding Project Files..........................................................................70

Dissecting My Project ..........................................................................70

Application.MyApp .............................................................................70

AssemblyInfo.vb ..................................................................................72

Resources and the Resources.resx File .................................................73

Application Settings.............................................................................77

Understanding References ............................................................................79

Adding References to COM Libraries ..................................................82

Deploy Without PIAs...........................................................................83

Final Considerations............................................................................84

4 Data Types and Expressions 85

Common Type System..................................................................................85

Everything Is an Object.......................................................................86

Introducing Value Types and Reference Types ...................................86

System.Object and System.ValueType...............................................87

Understanding Value Types..........................................................................89

.NET Framework Primitive Value Types ..............................................90

Using Value Types................................................................................92

Working with BigInteger ...................................................................100

Building Custom Value Types ...........................................................101

Understanding Reference Types .................................................................101

.NET Framework Primitive Reference Types .....................................103

Differences Between Value Types and Reference Types .............................104

Memory Allocation............................................................................104

Object-Oriented Differences..............................................................107

Performance Differences....................................................................109

What Custom Type Should I Choose?..............................................109

Converting Between Value Types and Reference Types.............................110

Understanding Implicit Conversions................................................110

Boxing and Unboxing .......................................................................112

Deep Copy and Shallow Copy ..........................................................114

The GetType Keyword........................................................................118

Conversion Operators.................................................................................119

Widening and Narrowing Conversions ............................................119

Working with .NET Fundamental Types ....................................................124

Working with Strings.........................................................................125

Working with Dates...........................................................................137

Working with Time............................................................................143

Working with TimeZone and TimeZoneInfo ......................................144

Working with GUIDs.........................................................................147

Working with Arrays..........................................................................148

Common Operators ....................................................................................155

Arithmetic Operators.........................................................................155

Assignment Operators .......................................................................157

Logical, Bitwise and Shift Operators .................................................158

Concatenation Operators ..................................................................163

Comparison Operators ......................................................................164

Iterations, Loops, and Conditional Code Blocks .......................................166

Iterations............................................................................................166

Loops..................................................................................................169

Conditional Code Blocks...................................................................171

Constants...........................................................................................174

With..End With statement................................................................175

5 Debugging Visual Basic 2010 Applications 177

Preparing an Example.................................................................................177

Debugging Instrumentation .......................................................................178

Debugging in Steps............................................................................178

Mixed Mode Debugging ....................................................................180

“Just My Code” Debugging ...............................................................180

Working with Breakpoints and Trace Points.....................................182

Locals Window ..................................................................................185

Command Window...........................................................................185

Call Stack Window ............................................................................186

Watch Windows.................................................................................187

Threads Window................................................................................189

Autos Window ...................................................................................190

Debugger Visualizers ...................................................................................191

Debugging in Code .....................................................................................192

The Debug Class .................................................................................192

The Trace Class .................................................................................194

Understanding Trace Listeners ..........................................................195

Using Debug Attributes in Your Code...............................................201

6 Handling Errors and Exceptions 207

Introducing Exceptions...............................................................................207

Handling Exceptions...................................................................................208

Are You Upgrading from Visual Basic 6? ..........................................209

System.Exception, Naming Conventions and Specialization .........209

Try..Catch..Finally........................................................................209

The Throw Keyword ...........................................................................218

The When Keyword .............................................................................222

Catching Exceptions Without a Variable..........................................224

Part II Object-Oriented Programming with Visual Basic 2010

7 Class Fundamentals 225

Declaring Classes.........................................................................................225

Nested Classes....................................................................................226

Fields ...........................................................................................................227

Avoiding Ambiguities with Local Variables ......................................228

Properties.....................................................................................................229

Read-Only Properties .........................................................................231

Write-Only Properties ........................................................................231

Exposing Custom Types ....................................................................232

Accessing Properties...........................................................................232

Default Properties ..............................................................................233

Scope ...........................................................................................................234

Methods ......................................................................................................236

Invoking Methods .............................................................................236

Methods Arguments: ByVal and ByRef .............................................237

Overloading Methods........................................................................242

Exit from Methods.............................................................................245

Partial Classes..............................................................................................246

Partial Methods ...........................................................................................249

Constructors................................................................................................251

Overloading Constructors .................................................................254

Object Initializers...............................................................................256

Shared Members..........................................................................................257

Shared Classes....................................................................................258

Shared Fields ......................................................................................258

Shared Properties ...............................................................................259

Shared Methods .................................................................................259

Shared Constructors ..........................................................................261

Common Language Specification...............................................................262

Where Do I Need to Apply? ..............................................................262

Marking Assemblies and Types as CLS-Compliant ...........................263

Naming Conventions ........................................................................263

Rules About Classes ...........................................................................265

Rules About Properties.......................................................................265

Rules About Methods ........................................................................265

Rules About Arrays.............................................................................266

8 Managing an Object’s Lifetime 267

Understanding Memory Allocation............................................................267

Understanding Garbage Collection............................................................268

Understanding the Finalize Method........................................................269

Understanding Dispose and the IDisposable Interface............................271

Using..End Using Statement.............................................................273

Putting Dispose and Finalize Together...........................................273

Object Resurrection.....................................................................................276

Advanced Garbage Collection ....................................................................277

Interacting with the Garbage Collector ............................................277

Understanding Generations and Operation Modes................................278

9 Organizing Types Within Namespaces 281

Understanding What Namespaces Are.......................................................281

Organizing Types Within Namespaces.......................................................282

Why Are Namespaces So Useful? ......................................................285

Nested Namespaces............................................................................286

Scope ..................................................................................................289

Root Namespace ................................................................................289

Global Keyword.................................................................................290

Imports Directives .............................................................................291

Namespaces and Common Language Specification .........................294

10 Modules 295

Modules Overview ......................................................................................295

Scope ..................................................................................................296

Differences Between Modules and Classes .................................................297

No Constructor..................................................................................297

No Inheritance Support.....................................................................297

No Interface Implementation............................................................297

11 Structures and Enumerations 299

Assignments ................................................................................................302

Passing Structures to Methods....................................................................302

Members’ Visibility .....................................................................................303

Inheritance Limitations and Interfaces Implementation ..........................303

Memory Allocation .....................................................................................303

Organizing Structures .................................................................................304

Overloading Operators................................................................................305

Overloading CType.............................................................................307

Structures and Common Language Specification ......................................308

Enumerations..............................................................................................309

Using Enumerations ..........................................................................310

Useful Methods from System.Enum ...................................................311

Using Enums As Return Values From Methods ................................314

Enum Values As Bit Flags...................................................................315

Enumerations and Common Language Specification ......................315

12 Inheritance 317

Applying Inheritance ..................................................................................318

Illustrating System.Object in Detail ..........................................................321

Introducing Polymorphism ........................................................................323

Overriding Members ...................................................................................325

NotOverridable Keyword..................................................................328

Overloading Derived Members .........................................................328

Conditioning Inheritance...........................................................................328

NotInheritable Keyword..................................................................329

MustInherit and MustOverride Keywords .......................................330

Accessing Base Classes Members ................................................................331

MyBase Keyword.................................................................................332

MyClass Keyword...............................................................................334

Constructors’ Inheritance ...........................................................................335

Shadowing...................................................................................................336

Overriding Shared Members.......................................................................337

Practical Inheritance: Building Custom Exceptions...................................338

13 Interfaces 341

Defining Interfaces......................................................................................341

Implementing and Accessing Interfaces.....................................................343

Passing Interfaces As Method Arguments .........................................345

Interfaces and Polymorphism.....................................................................345

Interfaces Inheritance .................................................................................346

Defining CLS-Compliant Interfaces ...........................................................347

Most Common .NET Interfaces ..................................................................348

The IEnumerable Interface ................................................................348

The IComparable Interface ................................................................351

The IConvertible Interface ..............................................................353

The IFormattable Interface ..............................................................356

14 Generics and Nullable Types 359

Introducing Generics ..................................................................................359

Creating and Consuming Generics ............................................................360

Consuming Generic Types ................................................................362

Implementing Generic Methods .......................................................363

Understanding Constraints ...............................................................363

Overloading Type Parameters............................................................366

Introducing Nullable Types ........................................................................367

15 Delegates and Events 371

Understanding Delegates............................................................................371

Declaring Delegates ...........................................................................372

Combining Delegates: Multicast Delegates.......................................374

Handling Events..........................................................................................375

Registering for events: AddHandler and RemoveHandler...................375

Declaring Objects with the WithEvents Keyword.............................377

Offering Events to the External World.......................................................378

Raising Events....................................................................................378

Creating Custom Events....................................................................381

16 Working with Collections 385

Understanding Collections Architecture....................................................385

Working with Nongeneric Collections.......................................................386

The ArrayList Collection .................................................................386

The Queue Collection.........................................................................389

The Stack Collection.........................................................................390

The HashTable Collection .................................................................390

The ListDictionary Collection ........................................................391

The OrderedDictionary Collection ..................................................391

The SortedList Collection ...............................................................392

The HybridDictionary Collection ....................................................392

The StringCollection Collection ....................................................392

The StringDictionary Collection ....................................................393

The NameValueCollection Collection...............................................393

The BitArray Collection ...................................................................393

The Bitvector32 Collection..............................................................394

Working with Generic Collections .............................................................395

The List(Of T) Collection...................................................................395

Working with Collection Initializers.................................................397

The ReadOnlyCollection(Of T) Collection .......................................398

The Dictionary(Of TKey, TValue) Collection ....................................399

The SortedDictionary(Of TKey, TValue) Collection..........................400

The ObservableCollection(Of T) Collection .....................................400

The ReadonlyObservableCollection(Of T) Collection ......................402

The LinkedList(Of T) Collection .......................................................403


Login

  |  

Complaints

  |  

Blog

  |  

Games

  |  

Digital Media

  |  

Souls

  |  

Obituary

  |  

Contact Us

  |  

FAQ

CAN'T FIND WHAT YOU'RE LOOKING FOR? CLICK HERE!!!

X
WonderClub Home

This item is in your Wish List

Visual Basic 2010 Unleashed, Foreword by Beth Massi Senior Program Manager, Microsoft Visual Studio
<i>Visual Basic 2010 Unleashed</i> is the most comprehensive, practical reference to modern object-oriented programming with Visual Basic 2010. Written by Visual Basic MVP Alessandr, Visual Basic 2010 Unleashed

X
WonderClub Home

This item is in your Collection

Visual Basic 2010 Unleashed, Foreword by Beth Massi Senior Program Manager, Microsoft Visual Studio
<i>Visual Basic 2010 Unleashed</i> is the most comprehensive, practical reference to modern object-oriented programming with Visual Basic 2010. Written by Visual Basic MVP Alessandr, Visual Basic 2010 Unleashed

Visual Basic 2010 Unleashed

X
WonderClub Home

This Item is in Your Inventory

Visual Basic 2010 Unleashed, Foreword by Beth Massi Senior Program Manager, Microsoft Visual Studio
<i>Visual Basic 2010 Unleashed</i> is the most comprehensive, practical reference to modern object-oriented programming with Visual Basic 2010. Written by Visual Basic MVP Alessandr, Visual Basic 2010 Unleashed

Visual Basic 2010 Unleashed

WonderClub Home

You must be logged in to review the products

E-mail address:

Password: