Microsoft Visual C# 2013 Step by Step
John Sharp
Published by Microsoft Press
Special Upgrade Offer
If you purchased this ebook directly from oreilly.com, you have the following benefits:
DRM-free ebooksuse your ebooks across devices without restrictions or limitations
Multiple formatsuse on your laptop, tablet, or phone
Lifetime access, with free updates
Dropbox syncingyour files, anywhere
If you purchased this ebook from another retailer, you can upgrade your ebook to take advantage of all these benefits for just $4.99. to access your ebook upgrade.
Please note that upgrade offers are not available from sample content.
Introduction
Microsoft Visual C# is a powerful but simple language aimed primarily at developers creating applications by using the Microsoft .NET Framework. It inherits many of the best features of C++ and Microsoft Visual Basic, but few of the inconsistencies and anachronisms, resulting in a cleaner and more logical language. C# 1.0 made its public debut in 2001. The advent of C# 2.0 with Visual Studio 2005 saw several important new features added to the language, including generics, iterators, and anonymous methods. C# 3.0, which was released with Visual Studio 2008, added extension methods, lambda expressions, and most famously of all, the Language-Integrated Query facility, or LINQ. C# 4.0, released in 2010, provided further enhancements that improve its interoperability with other languages and technologies. These features included support for named and optional arguments, and the dynamic type, which indicates that the language runtime should implement late binding for an object. An important addition in the .NET Framework released concurrently with C# 4.0 was the classes and types that constitute the Task Parallel Library (TPL). Using the TPL, you can build highly scalable applications that can take full advantage of multicore processors quickly and easily. C# 5.0 adds native support for asynchronous task-based processing through the async method modifier and the await operator.
Another key event for Microsoft has been the launch of Windows 8. This new version of Windows supports highly interactive applications that can share data and collaborate with each other as well as connect to services running in the cloud. The development environment provided by Microsoft Visual Studio 2012 made all these powerful features easy to use, and the many new wizards and enhancements included in Visual Studio 2012 can greatly improve your productivity as a developer.
After listening to feedback from developers, Microsoft modified some aspects of the way in which the user interface works and released a technical preview of Windows 8.1 containing these changes. At the same time, Microsoft released a preview edition of Visual Studio 2013, containing incremental changes to Visual Studio 2012 and adding new features that help to further improve programmer productivity. Although many of the updates to Visual Studio are small, and there have been no changes to the C# language in this release, we felt that the modifications to the way in which Windows 8.1 handles the user interface would make it beneficial to perform a similar incremental update to this book. The result is this volume.
Note
This book is based on the Technical Preview of Visual Studio 2013. Consequently, some features of the IDE might change in the final release of the software.
Who should read this book
This book assumes that you are a developer who wants to learn the fundamentals of programming with C# by using Visual Studio 2013 and the .NET Framework version 4.5.1. By the time you complete this book, you will have a thorough understanding of C# and will have used it to build responsive and scalable applications that can run by using the Windows operating system.
You can build and run C# 5.0 applications on Windows 7, Windows 8, and Windows 8.1, although the user interfaces provided by Windows 7 and Windows 8 have some significant differences. Additionally, Windows 8.1 has modified some parts of the user interface model, and applications designed to take advantage of these changes might not run on Windows 8. Consequently, focuses on the application development model used by Windows 8.1, and the material in this section provides an introduction to building interactive applications for this new platform.
Who should not read this book
This book is aimed at developers new to C#, but not completely new to programming. As such, it concentrates primarily on the C# language. This book is not intended to provide detailed coverage of the multitude of technologies available for building enterprise-level applications for Windows, such as ADO.NET, ASP.NET, Windows Communication Foundation, or Workflow Foundation. If you require more information on any of these items, you might consider reading some of the other titles in the Step by Step for Developers series available from Microsoft Press, such as Microsoft ASP.NET 4 Step by Step by George Shepherd, Microsoft ADO.NET 4 Step By Step by Tim Patrick, and Microsoft Windows Communication Foundation 4 Step By Step by John Sharp.
Organization of this book
This book is divided into four sections:
provides an introduction to the core syntax of the C# language and the Visual Studio programming environment.
goes into detail on how to create and manage new types by using C#, and how to manage the resources referenced by these types.
includes extended coverage of the elements that C# provides for building types that you can reuse across multiple applications.
describes the Windows 8.1 programming model, and how you can use C# to build interactive applications for this new model.
Note
Although are also applicable to Windows 8 and Windows 7 applications.
Finding your best starting point in this book
This book is designed to help you build skills in a number of essential areas. You can use this book if you are new to programming or if you are switching from another programming language such as C, C++, Java, or Visual Basic. Use the following table to find your best starting point.
If you are | Follow these steps |
New to object-oriented programming | Install the practice files as described in the upcoming section, . Work through the chapters in sequentially. Complete as your level of experience and interest dictates.
|
Familiar with procedural programming languages such as C but new to C# | Install the practice files as described in the upcoming section, . Complete as your level of experience and interest dictates.
|
Migrating from an object-oriented language such as C++ or Java | Install the practice files as described in the upcoming section, . Skim the first seven chapters to get an overview of C# and Visual Studio 2013, and then concentrate on . For information about building scalable Windows 8.1 applications, read .
|
Switching from Visual Basic to C# | Install the practice files as described in the upcoming section, . Work through the chapters in sequentially. For information about building Windows 8.1 applications, read .
|