Home > Store

Visual Basic 2015 Unleashed

Register your product to gain access to bonus material or receive a coupon.

Visual Basic 2015 Unleashed

eBook (Watermarked)

  • Your Price: $46.39
  • List Price: $57.99
  • Includes EPUB and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    Adobe Reader PDF The popular standard, used most often with the free Acrobat® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.

Description

  • Copyright 2016
  • Dimensions: 7" x 9-1/8"
  • Pages: 1440
  • Edition: 1st
  • eBook (Watermarked)
  • ISBN-10: 0-13-419671-6
  • ISBN-13: 978-0-13-419671-8

Using Visual Basic 2015, developers can build cutting-edge applications that run practically anywhere: on Windows desktops, new Windows 10 devices, in mobile and cloud environments, and beyond. Visual Basic 2015 Unleashed is the most comprehensive, practical reference to modern programming with VB 2015.


Long-time Visual Basic MVP Alessandro Del Sole walks you through the latest version of the language, helping you thoroughly master its most valuable features, most powerful programming techniques, and most effective development patterns. Next, he shows how to use Visual Basic 2015 to build robust, effective software in a wide range of environments.


Extensively updated for Visual Basic 2015’s major improvements, this guide covers both Visual Basic 2015 Professional Edition for professional developers and the free Community Edition for hobbyists, novices, and students. Del Sole has added detailed coverage of building new universal Windows apps for Windows 10 and using new Visual Studio 2015 capabilities to supercharge your productivity as a developer. If you want to leverage all of VB 2015’s power, this is the book you need.


Detailed information on how to...

  • Understand the Visual Studio 2015 IDE, .NET Framework 4.6 and the new .NET Core 5, and the anatomy of a VB 2015 application
  • Debug VB applications and implement error handling and exceptions
  • Keep your code clean and well-organized with VB 2015’s new refactoring tools
  • Master modern VB object development: namespaces, modules, structures, enums, inheritance, interfaces, generics, delegates, events, collections, iterators, and more
  • Share Visual Basic code with Portable Class Libraries and Shared Projects
  • Access data with LINQ and ADO.NET Entity Framework
  • Manipulate XML documents with LINQ and XML Literals
  • Build and deploy applications to run in the Microsoft Azure cloud
  • Develop universal Windows apps that run on any Windows 10 device
  • Use advanced .NET 4.6 platform capabilities, including async and parallel programming, multithreading, assemblies, reflection, and coding attributes
  • Leverage new compiler APIs to write custom domain-specific live code analysis rules
  • Test code with unit tests and TDD 
  • Deploy apps efficiently with InstallShield for Visual Studio and ClickOnce

Sample Content

Table of Contents

Introduction     1

Code Samples and Software Requirements     2

Part I: Learning the Basics of VB

Chapter 1: Introducing .NET 2015     3

.NET 2015: A New Vision for Development     3

The .NET Framework 4.6 for Desktop     5

Introducing .NET Core 5     10

Programming Languages in Visual Studio 2015     12

What’s New with Compilers     13

The Windows Software Development Kit     15

Summary     15

Chapter 2: The Visual Studio 2015 IDE for Visual Basic     17

What’s New in Visual Studio 2015     17

Status Bar and Start Page     18

Working with Projects and Solutions     20

Working with Tool Windows     35

The My Project Window     42

Compiling Projects     48

Debugging Overview     58

Browsing the Visual Basic and .NET Documentation     65

Quick Launch Tool     67

Showing the Hierarchy of Method Calls     69

Summary     70

Chapter 3: The Anatomy of a Visual Basic Project     71

Brief Overview of Types and Members     71

Visual Basic 2015 Reserved Keywords     80

Understanding Project Files     82

Understanding References     92

Summary     97

Chapter 4: Data Types and Expressions     99

Introducing the Common Type System     99

Understanding Value Types     103

Understanding Reference Types     113

Differences Between Value Types and Reference Types     116

Converting Between Value Types and Reference Types     121

Understanding Conversion Operators     129

Working with .NET Fundamental Types     135

Common Operators     172

Iterations, Loops, and Conditional Code Blocks     188

Summary     197

Chapter 5: Debugging Visual Basic 2015 Applications     199

Preparing an Example     199

Debugging Instrumentation     200

Inspecting Object Details with Debugger Visualizers     215

Debugging in Code     216

Summary      230

Chapter 6: Errors, Exceptions, and Code Refactoring     231

Introducing Exceptions     231

Handling Exceptions     233

Refactoring Your Code: Light Bulbs and Quick Actions     249

Summary     266

Part II: Object-Oriented Programming with Visual Basic 2015

Chapter 7: Class Fundamentals     267

Declaring Classes     267

Storing Information with Properties     271

Types and Members Visibility: Scope     276

Executing Actions with Methods     278

Organizing Code with Partial Classes     290

Splitting Method Definitions with Partial Methods     293

Instantiating Objects with Constructors     295

Shared Members     301

Common Language Specification     306

Summary     311

Chapter 8: Managing an Object’s Lifetime     313

Understanding Memory Allocation     313

Understanding Garbage Collection     314

Understanding the Finalize Method     315

Understanding Dispose and the IDisposable Interface     317

Advanced Garbage Collection     323

Summary     326

Chapter 9: Organizing Types Within Namespaces     327

Understanding Namespaces     327

Organizing Types Within Namespaces     328

Global Namespaces and the Global Keyword     342

Summary     345

Chapter 10: Modules     347

Modules Overview     347

Differences Between Modules and Classes     349

Summary     350

Chapter 11: Structures and Enumerations     351

Understanding Structures     351

Overloading Operators     356

Structures and Common Language Specification     360

Grouping Constants with Enumerations     361

Summary     367

Chapter 12: Inheritance     369

Applying Inheritance     370

Introducing Polymorphism     375

Overriding Members     377

Conditioning Inheritance     380

Accessing Base Classes Members     383

Constructors’ Inheritance     387

Shadowing     388

Overriding Shared Members     389

Practical Inheritance: Building Custom Exceptions     390

Summary     392

Chapter 13: Interfaces     393

Defining Interfaces     393

Implementing and Accessing Interfaces     394

Partial Interfaces     399

Interfaces and Polymorphism     399

Interfaces Inheritance     400

Defining CLS-Compliant Interfaces     402

Most Common .NET Interfaces     402

Summary     412

Chapter 14: Generics and Nullable Types     413

Introducing Generics     413

Creating and Consuming Generics     414

Introducing Nullable Types     422

Summary     425

Chapter 15: Delegates and Events     427

Understanding Delegates     427

Handling Events     431

Offering Events to the External World     433

Summary     439

Chapter 16: Working with Collections and Iterators     441

Understanding Collections Architecture     442

Working with Nongeneric Collections     442

Working with Generic Collections     451

The Null-Conditional Operator and Collections     461

Building Custom Collections     462

Concurrent Collections     463

Immutable Collections     463

Iterators     464

Summary     472

Chapter 17: Working with Objects: Visual Tools and Code Sharing     473

Visual Studio Class Designer     473

Class View Window     484

Creating Types with Generate from Usage     485

Creating Portable Classes     491

Shared Projects     503

Summary     512

Part III: Advanced Language Features

Chapter 18: Manipulating Files and Streams     513

Manipulating Directories and Pathnames     513

Handling Exceptions for Directories and Pathnames     519

Manipulating Files     519

Introducing Streams     524

Summary     535

Chapter 19: The My Namespace     537

Introducing the My Namespace     537

My.Application     538

My.Computer     542

My.Settings     550

My.Resources     556

My.User     560

My.WebServices     562

Extending My     562

My in Different Applications     566

Summary     570

Chapter 20: Advanced Language Features     571

Local Type Inference     571

Array Literalsv575

Extension Methods     577

Anonymous Types     585

Relaxed Delegates     586

Lambda Expressions     587

Generic Variance     596

Summary     598

Part IV: Data Access with ADO.NET and LINQ

Chapter 21: Introducing ADO.NET and DataSets     599

System Requirements     599

Introducing ADO.NET     600

Introducing DataSets     603

Summary     608

Chapter 22: Introducing LINQ     609

What Is LINQ?     .609

LINQ Examples     611

Language Support     612

Understanding Providers     613

Overview of LINQ Architecture     613

Summary     614

Chapter 23: LINQ to Objects     615

Introducing LINQ to Objects     615

Querying in Memory Objects     616

Introducing Standard Query Operators     625

Summary     644

Chapter 24: LINQ to SQL     645

Introducing LINQ to SQL     646

Querying Data with LINQ to SQL     658

Insert/Update/Delete Operations with LINQ     663

Advanced LINQ to SQL     672

Summary     677

Chapter 25: LINQ to DataSets     679

Querying DataSets with LINQ     679

LINQ to DataSets’ Extension Methods     682

Summary     685

Chapter 26: Introducing ADO.NET Entity Framework     687

Introducing Entity Framework     687

Understanding Entity Data Models     688

Insert/Update/Delete Operations for Entities     703

Querying EDMs with LINQ to Entities     710

Querying EDMs with Entity SQL     712

Mapping Stored Procedures     712

Introducing the Code First Approach     716

Summary     727

Chapter 27: Manipulating XML Documents with LINQ and XML Literals     729

Introducing LINQ to XML     730

Writing XML Markup in VB with XML Literals     735

Summary     743

Part V: Building Windows Desktop Applications

Chapter 28: Creating WPF Applications     745

What Is WPF?      746

Introducing the WPF Architecture     747

Building WPF Applications with Visual Studio 2015     749

Understanding the eXtensible Application Markup Language     751

Understanding Visual Tree and Logical Tree     757

Handling Events in WPF     759

Arranging Controls with Panels     762

Managing Windows     770

Introducing the Application Object     772

Brief Overview of WPF Browser Applications     774

Live Visual Tree     777

Summary     778

Chapter 29: WPF Common Controls     779

Introducing WPF Controls Features     779

Understanding the ContentControl     780

Understanding Common Controls     781

Using Common Dialogs     809

Summary     810

Chapter 30: Brushes, Styles, Templates, and Animations in WPF     811

Introducing Brushes     812

Introducing Styles     828

Introducing Control Templates     833

Introducing Transformations     836

Introducing Animations     840

Summary     849

Chapter 31: Manipulating Media and Documents     851

Viewing Images     851

Playing Media     853

Manipulating Documents     857

Viewing XPS Documents     866

Summary     867

Chapter 32: Introducing Data-Binding     869

Introducing the Data-Binding in WPF     869

Discussing the Drag and Drop Data-Binding     876

Summary     900

Chapter 33: Localizing Applications     901

Introducing .NET Localization     902

Introducing the Multilingual App Toolkit     902

Windows Forms Localization     903

WPF Localization     906

Summary     908

Part VI: Building Web and Mobile Applications

Chapter 34: Building and Publishing ASP.NET Web Applications     909

Introducing the ASP.NET Model     910

Web Forms and Master Pages     914

ASP.NET Controls     917

Handling Events     919

Understanding State Management     920

Creating a Web Application with VB 2015 with Data Access and Pages     923

Publishing ASP.NET Web Applications     940

Summary     949

Chapter 35: Building and Deploying Applications for Microsoft Azure     951

Overview of the Microsoft Azure Platform     951

Registering for Microsoft Azure     953

Downloading and Installing Tools for Visual Studio     954

Introducing the Management Portal     954

Creating a SQL Azure Database     955

Creating an ASP.NET Application for the Cloud     961

Deploying Applications to Microsoft Azure     964

A Step Further: Web Roles and Worker Roles     967

Additional Tools     970

Summary     972

Chapter 36: Building Universal Apps for Windows 10     973

Introducing Universal Windows Apps     974

Introducing the Universal Windows Platform     975

Registering with the Windows Store     976

Installing the Developer Tools     976

Creating Apps with Visual Basic     977

Customizing the Application Manifest     998

Starting and Debugging Universal Windows Apps     1002

Creating and Testing App Packages     1009

Submitting Apps to the Store     1010

Summary     1011

Part VII: Networking and Exposing Data Through Networks

Chapter 37: Creating and Consuming WCF Services     1013

Introducing Windows Communication Foundation     1014

Implementing WCF Services     1015

Consuming WCF Services     1024

Handling Exceptions in WCF     1030

Hosting WCF Services in Internet Information Services and Microsoft Azure     1031

Configuring Services with the Configuration Editor     1033

Summary     1034

Chapter 38: Implementing and Consuming OData Services     1035

What Are OData Services?      1035

Creating an OData Endpoint     1036

Consuming OData Services     1060

Implementing and Consuming Functions     1068

Summary     1071

Part VIII: Advanced .NET Framework with VB 2015

Chapter 39: Serialization     1073

Objects Serialization     1074

XML Serialization     1081

Custom Serialization     1083

Serialization with XAML     1086

Serialization in Windows Communication Foundation     1088

Serialization in the ADO.NET Entity Framework     1091

Summary     1092

Chapter 40: Processes and Multithreading     1095

Managing Processes     1096

Introducing Multithreading     1098

Understanding the .NET Thread Pool     1099

Threads Synchronization     1101

Summary     1104

Chapter 41: Parallel Programming and Parallel LINQ     1105

Introducing Parallel Computing     1106

Understanding and Using Tasks     1107

Parallel Loops     1116

Debugging Tools for Parallel Tasks     1122

Concurrent Collections     1124

Introducing Parallel LINQ     1128

Summary     1137

Chapter 42: Asynchronous Programming     1139

Overview of Asynchrony     1140

The Old-Fashioned Way: Event-Based Asynchrony     1140

The Old-Fashioned Way: The Asynchronous Programming Model     1142

The Modern Way: The Async Pattern     1143

Getting Started with Async/Await     1147

Exception Handling in Async     1161

Implementing Task-Based Asynchrony     1161

Cancellation and Progress     1165

Asynchronous Lambda Expressions     1170

Asynchronous I/O File Operations in .NET 4.6     1171

Debugging Tasks     1175

Summary     1176

Chapter 43: Working with Assemblies     1177

Assembly Overview     1177

Understanding Application Domains     1179

Security Model in .NET 4.6     1182

Summary     1189

Chapter 44: Reflection     1191

Introducing Reflection     1191

Understanding Assemblies’ Metadata     1192

Getting Assembly Information     1194

Reflecting Types     1196

Invoking Code Dynamically     1204

Generating Code at Runtime with Reflection.Emit     1206

Caller Information     1212

Summary     1215

Chapter 45: Coding Attributes     1217

Applying Attributes     1217

Coding Custom Attributes     1220

Reflecting Attributes     1225

Summary     1226

Chapter 46: Platform Invokes and Interoperability with the COM Architecture     1229

Importing and Using COM Objects     1230

Catching Exceptions     1233

Releasing COM Objects     1233

Calling COM Objects from WPF     1234

P/Invokes and Unmanaged Code     1237

References to the Win32 API Calls     1244

Summary     1244

Chapter 47: Documenting Source Code with XML Comments     1245

Understanding XML Comments     1246

Implementing XML Comments     1248

Generating Compiled Help Files     1258

Summary     1259

Part IX: Applications Deployment

Chapter 48: Understanding the Global Assembly Cache     1261

The Dll Hell Problem     1261

The Global Assembly Cache     1263

Summary     1267

Chapter 49: Setup and Deployment Projects with InstallShield for Visual Studio     1269

Windows Installer Overview     1270

Introducing InstallShield     1271

Creating a Setup Project     1272

Configuring the Setup Project     1283

Building and Deploying the Windows Installer Package     1285

Summary     1285

Chapter 50: Deploying Applications with ClickOnce     1287

Introducing ClickOnce     1287

Deploying Applications with ClickOnce     1289

Configuring ClickOnce     1294

Security Considerations     1299

Programmatically Accessing ClickOnce     1301

Registration-Free COM     1302

Summary     1304

Part X: Code Analysis with VB 2015

Chapter 51: Code Analysis: The .NET Compiler Platform and Tools     1305

Live Code Analysis with the .NET Compiler Platform     1306

Calculating Code Metrics     1349

Diagnostic Tools and IntelliTrace     1351

Code Clone Detection     1359

Summary     1361

Appendix A: Useful Resources and Tools for Visual Basic 2015     1363

Visual Basic Resources in MSDN     1363

Useful Developer Tools for Visual Basic     1364

Index     1367

Online-Only Chapters

Chapter 52: Advanced IDE Features

Chapter 53: Testing Code with Unit Tests and Test-Driven Development

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020