Your hands-on guide to Visual C++/CLI fundamentals
Expand your expertise—and teach yourself the fundamentals of the Microsoft Visual C++/CLI language. If you have previous programming experience but are new to Visual C++, this tutorial delivers the step-by-step guidance and coding exercises you need to master core topics and techniques.
Discover how to:
Write and debug object-oriented C++ programs in Visual Studio 2012
Utilize the various features of the C++/CLI language
Make use of the Microsoft .NET Framework Class Library
Create a simple Windows Store app
Use .NET features such as properties, delegates and events
Access data from disparate sources using ADO.NET
Create and consume web services using Windows Communication Foundation
Work effectively with legacy code and COM
Getting Started with C++ .NET
Chapter 1 Hello C++!
What is C++/CLI?
Your first C++/CLI application
Creating an executable application—theory
Creating an executable application—practice
Chapter 2 Introducing Object-Oriented Programming
What is object-oriented programming?
Features of object-oriented programming languages
Classes and objects
Benefits to the development life cycle
A simple example
Chapter 3 Variables and Operators
What is a variable?
The fundamental data types
Declaring a variable
Declaring multiple variables
Assigning values to variables
Handles and pointers
The .NET Framework String class
Operators and expressions
Chapter 4 Using Functions
Declaring function prototypes
Chapter 5 Decision and Loop Statements
Making decisions by using the if statement
Making decisions by using the switch Statement
Chapter 6 More About Classes and Objects
Organizing classes into header files and source files
Initializing objects by using constructors
Defining class-wide members
Using constants in classes
Defining object relationships
Chapter 7 Controlling Object Lifetimes
The .NET approach to object lifetimes
Destruction and finalization
Chapter 8 Inheritance
What is inheritance?
Designing an inheritance hierarchy
Defining a base class
Defining a derived class
Creating derived class objects
Concrete and abstract classes
Overriding member functions
Defining sealed classes
Defining and using interfaces
Microsoft .NET Programming Basics
Chapter 9 Value Types
Reference types and value types
Chapter 10 Operator Overloading
What is operator overloading?
Overloading operators in managed types
Chapter 11 Exception Handling
What are exceptions?
Creating your own exception types
Using safe_cast for dynamic casting
Using exceptions across languages
Chapter 12 Arrays and Collections
Native C++ arrays
The .NET array class
Other .NET collection classes
Generics and templates
Chapter 13 Properties
What are properties?
Implementing scalar properties
Implementing indexed properties
Adding accounts to the Bank class
Chapter 14 Delegates and Events
What are delegates?
What is the purpose of delegates?
What are events?
Chapter 15 The .NET Framework Class Library
What is the .NET Framework?
The .NET Framework namespaces
Using the .NET Framework
Chapter 16 Working with Files
The System::IO namespace
Implementing text I/O by using readers and writers
Working with files and directories
Chapter 17 Reading and Writing XML
XML and .NET
Parsing XML by using XmlReader
Writing XML by using XmlTextWriter
Chapter 18 Using ADO.NET
What is ADO.NET?
Creating a connected application
Creating a disconnected application
Disconnected operation using a DataSet
Chapter 19 Writing a Service by Using Windows Communication Foundation
What is Windows Communication Foundation?
The ABCs of WCF
Creating a service
Chapter 20 Introducing Windows Store Apps
A (brief) history of writing Windows user interface applications
Julian Templeman is a professional consultant, trainer, and writer who has been using and teaching C++ for nearly 20 years and has been involved with .NET since its first alpha release in 1998. He is the author or coauthor of 10 programming books, including COM Programming with Microsoft .NET.