طراحی پورتال های سازمانی شرکت پروجان

شیرپوینت و پراجکت سرور پروجان

استقرار شیرپوینت و پراجکت سرور

مسیر سایت

کتاب Beginning C# 6.0 Programming with Visual Studio 2015.pdf

Beginning C# 6.0 Programming with Visual Studio 2015

دانلود رایگان کتاب Beginning C# 6.0 Programming with Visual Studio 2015.pdf

Benjamin Perkins     Jacob Vibe Hammer     Jon D. Reid

Copyright © 2016 by John Wiley & Sons, Inc., Indianapolis, Indiana

لینک دانلود کتاب Beginning C# 6.0 Programming with Visual Studio 2015.pdf

لینک دانلود کدهای کتاب Beginning C# 6 Programming with Visual Studio 2015 (Code Only).rar

 

 

 

Contents

Part I: The OOP Language
Chapter 1: Introducing C#

What Is the .NET Framework?
What Is C#?
Visual Studio 2015

 

Chapter 2: Writing a C# Program

The Visual Studio 2015 Development Environment
Console Applications
Desktop Applications

 
Chapter 3: Variables and Expressions

Basic C# Syntax
Basic C# Console Application Structure
Variables
Expressions

 

Chapter 4: Flow Control

Boolean Logic
Branching
Looping

 

Chapter 5: More about Variables

Type Conversion
Complex Variable Types
String Manipulation

 

Chapter 6: Functions

Defining and Using Functions
Variable Scope
The Main() Function
Struct Functions
Overloading Functions
Using Delegates

 

Chapter 7: Debugging and Error Handling

Debugging in Visual Studio
Error Handling

 

Chapter 8: Introduction to Object-Oriented Programming

What Is Object-Oriented Programming?
OOP Techniques
OOP in Desktop Applications

 

Chapter 9: Defining Classes

Class Definitions in C#
System.Object
Constructors and Destructors
OOP Tools in Visual Studio
Class Library Projects
Interfaces Versus Abstract Classes
Struct Types
Shallow Copying Versus Deep Copying

 

Chapter 10: Defining Class Members

Member Definitions
Additional Class Member Topics
Interface Implementation
Partial Class Definitions
Partial Method Definitions
Example Application
The Call Hierarchy Window

 

Chapter 11: Collections, Comparisons, and Conversions

Collections
Comparisons
Conversions

 

Chapter 12: Generics

What Are Generics?
Using Generics
Defining Generic Types
Variance

 

Chapter 13: Additional C# Techniques

The : : Operator and the Global Namespace Qualifier
Custom Exceptions
Events
Expanding and Using CardLib
Attributes
Initializers
Type Inference
Anonymous Types
Dynamic Lookup
Advanced Method Parameters
Lambda Expressions

 

Part II: Windows Programming
Chapter 14: Basic Desktop Programming

XAML
The Playground
Control Layout
The Game Client

 

Chapter 15: Advanced Desktop Programming

Creating and Styling Controls
WPF User Controls
Putting It All Together
Part III: Cloud Programming

 

Chapter 16: Basic Cloud Programming

The Cloud, Cloud Computing, and the Cloud Optimized Stack
Cloud Patterns and Best Practices
Using Microsoft Azure C# Libraries to Create a Storage Container
Creating an ASP.NET 4.6 Web Site that Uses the Storage Container
How It Works

 

Chapter 17: Advanced Cloud Programing and Deployment

Creating an ASP.NET Web API
Deploying and Consuming an ASP.NET Web API on Microsoft Azure
Scaling an ASP.NET Web API on Microsoft Azure

 

Part IV: Data Access

Chapter 18: Files

File Classes for Input and Output
Streams
Monitoring the File System

 

Chapter 19: XML and JSON

JSON Basics
XML Schemas
Converting XML to JSON

 

Chapter 20: LINQ

LINQ to XML
LINQ Query Syntax
LINQ Method Syntax
Ordering Query Results
Understanding the orderby Clause
Querying a Large Data Set
Using Aggregate Operators
Using the Select Distinct Query
Ordering by Multiple Levels
Using Group Queries
Using Joins

 

Chapter 21: Databases

Using Databases
Installing SQL Server Express
Entity Framework
A Code First Database
But Where Is My Database?
Navigating Database Relationships
Handling Migrations
Creating and Querying XML from an Existing Database

 

Part V: Additional Techniques
Chapter 22: Windows Communication Foundation

What Is WCF?
WCF Concepts
WCF Programming

 

Chapter 23: Universal Apps

Getting Started
Universal Apps
App Concepts and Design
App Development
Common Elements of Windows Store Apps
The Windows Store
Appendix: Exercise Solutions

 

Introduction
C# is a relatively new language that was unveiled to the world when Microsoft announced the first version of its .NET Framework in July 2000. Since then its popularity has rocketed, and it has arguably become the language of choice for desktop, web, and cloud developers who use the .NET Framework. Part of the appeal of C# comes from its clear syntax, which derives from C/C++ but simplifies some things that have previously discouraged some programmers. Despite this simplification, C# has retained the power of C++, and there is now no reason not to move into C#. The language is not difficult and it's a great one to learn elementary programming techniques with. This ease of learning, combined with the capabilities of the .NET Framework, make C# an excellent way to start your programming career.
The latest release of C#, C# 6, which is included with version 4.6 of the .NET Framework, builds on the existing successes and adds even more attractive features. The latest release of Visual Studio (Visual Studio 2015) and the Visual Studio Express/Community 2015 line of development tools also bring many tweaks and improvements to make your life easier and to dramatically increase your productivity.
This book is intended to teach you about all aspects of C# programming, including the language itself, desktop and cloud programming, making use of data sources, and some new and advanced techniques. You'll also learn about the capabilities of Visual Studio 2015 and all the ways that this product can aid your application development.
The book is written in a friendly, mentor-style fashion, with each chapter building on previous ones, and every effort is made to ease you into advanced techniques painlessly. At no point will technical terms appear from nowhere to discourage you from continuing; every concept is introduced and discussed as required.
Technical jargon is kept to a minimum; but where it is necessary, it, too, is properly defined and laid out in context.
The authors of this book are all experts in their field and are all enthusiastic in their passion for both the C# language and the .NET Framework. Nowhere will you find a group of people better qualified to take you under their collective wing and nurture your understanding of C# from first principles to advanced techniques. Along with the fundamental knowledge it provides, this book is packed full of helpful hints, tips, exercises, and full-fledged example code (available for download at p2p.wrox.com) that you will find yourself returning to repeatedly as your career progresses.
We pass this knowledge on without begrudging it and hope that you will be able to use it to become the best programmer you can be. Good luck, and all the best! 

 

Who This Book Is For
This book is for everyone who wants to learn how to program in C# using the .NET Framework. It is for absolute beginners who want to give programming a try by learning a clean, modern, elegant programming language. But it is also for people familiar with other programming languages who want to explore the .NET platform, as well as for existing .NET developers who want to give Microsoft's .NET flagship language a try.

 

What This Book Covers

The early chapters cover the language itself, assuming no prior programming experience. If you have programmed in other languages before, much of the material in these chapters will be familiar. Many aspects of C# syntax are shared
with other languages, and many structures are common to practically all programming languages (such as looping and branching structures). However, even if you are an experienced programmer, you will benefit from looking through these chapters to learn the specifics of how these techniques apply to C#.
If you are new to programming, you should start from the beginning, where you will learn basic programming concepts and become acquainted with both C# and the .NET platform that underpins it. If you are new to the .NET Framework but know how to program, you should read Chapter 1 and then skim through the next few chapters before continuing with the application of the C# language. If you know how to program but haven't encountered an object-oriented programming language before, you should read the chapters from Chapter 8 onward.
Alternatively, if you already know the C# language, you might want to concentrate on the chapters dealing with the most recent .NET Framework and C# language developments, specifically the chapters on collections, generics, and C# language enhancements (Chapters 11 to 13), or skip the first section of the book completely and start with Chapter 14.
The chapters in this book have been written with a dual purpose in mind: They can be read sequentially to provide a complete tutorial in the C# language, and they can be dipped into as required reference material.
In addition to the core material, starting with Chapter 3 each chapter also includes a selection of exercises at the end, which you can work through to ensure that you have understood the material. The exercises range from simple multiple choice or true/false questions to more complex exercises that require you to modify or build applications. The answers to all the exercises are provided in Appendix A. You can also find these exercises as part of the wrox.com code downloads for this book at wrox.com/go/beginningvisualc#2015programming.
This book also gives plenty of love and attention to coincide with the release of C# 6 and .NET 4.6. Every chapter received an overhaul, with less relevant material removed, and new material added. All of the code has been tested against the latest version of the development tools used, and all of the screenshots have been retaken in Windows 8.1/10 to provide the most current windows and dialog boxes.

New highlights of this edition include the following:
* Additional and improved code examples for you to try out
* Coverage of everything that's new in C# 6 and .NET 4.6, including how to create Universal Windows Apps
* Examples of programming cloud applications and using Azure SDK to create and access cloud resources

 

 

How This Book Is Structured
This book is divided into six sections:
* Introduction — Purpose and general outline of the book's contents
* The C# Language — Covers all aspects of the C# language, from the fundamentals to object-oriented techniques
* Windows Programming — How to write and deploy desktop applications with the Windows Presentation Foundation library (WPF)
* Cloud Programming — Cloud application development and deployment, including the creation and consumption of a Web API
* Data Access — How to use data in your applications, including data stored in files on your hard disk, data stored in XML format, and data in databases
* Additional Techniques — An examination of some extra ways to use C# and the .NET Framework, including Windows Communication Foundation (WCF) and Universal Windows Applications
The following sections describe the chapters in the five major parts of this book.

 

The C# Language (Chapters 1–13)
Chapter 1 introduces you to C# and how it fits into the .NET landscape. You'll learn the fundamentals of programming in this environment and how Visual Studio 2015 (VS) fits in.
Chapter 2 starts you off with writing C# applications. You'll look at the syntax of C# and put the language to use with sample command-line and Windows applications. These examples demonstrate just how quick and easy it can be to get up and running, and along the way you'll be introduced to the Visual Studio development environment and the basic windows and tools that you'll be using throughout the book.
Next you'll learn more about the basics of the C# language. You'll learn what variables are and how to manipulate them in Chapter 3. You'll enhance the structure of your applications with flow control (looping and branching) in Chapter 4, and you'll see some more advanced variable types such as arrays in Chapter 5. In Chapter 6 you'll start to encapsulate your code in the form of functions, which makes it much easier to perform repetitive operations and makes your code much more readable.
By the beginning of Chapter 7 you'll have a handle on the fundamentals of the C# language, and you will focus on debugging your applications. This involves looking at outputting trace information as your applications are executed, and at how Visual Studio can be used to trap errors and lead you to solutions for them with its powerful debugging environment

From Chapter 8 onward you'll learn about object-oriented programming (OOP), starting with a look at what this term means and an answer to the eternal question, “What is an object?” OOP can seem quite difficult at first. The whole of
Chapter 8 is devoted to demystifying it and explaining what makes it so great, and you won't actually deal with much C# code until the very end of the chapter.
Everything changes in Chapter 9, when you put theory into practice and start using OOP in your C# applications. This is where the true power of C# lies. You'll start by looking at how to define classes and interfaces, and then move on to class members (including fields, properties, and methods) in Chapter 10. At the end of that chapter you'll start to assemble a card game application, which is developed over several chapters and will help to illustrate OOP.
Once you've learned how OOP works in C#, Chapter 11 moves on to look at common OOP scenarios, including dealing with collections of objects, and comparing and converting objects. Chapter 12 takes a look at a very useful feature of C# that was introduced in .NET 2.0: generics, which enable you to create very flexible classes. Next, Chapter 13 continues the discussion of the C# language and OOP with some additional techniques, notably events, which become very important in, for example, Windows programming. Chapter 13 wraps up the fundamentals by focusing on C# language features that were introduced with versions 3.0, 4, 5, and 6 of the language.

 

Windows Programming (Chapters 14–15)

Chapter 14 starts by introducing you to what is meant by Windows programming and looks at how this is achieved in Visual Studio. It focuses on WPF as a tool that enables you to build desktop applications in a graphical way and assemble advanced applications with the minimum of effort and time. You'll start with the basics of WPF programming and build up your knowledge in both this chapter and Chapter 15, which demonstrates how you can use the wealth of controls supplied by the .NET Framework in your applications.

 

Cloud Programming (Chapters 16–17) 

Chapter 16 starts by describing what cloud programming is and discusses the cloud optimized stack. The cloud environment is not identical to the way programs have been traditionally coded, so a few cloud programming patterns are discussed and defined. To complete this chapter, you require an Azure account, which is free, so that you can create an App Services Web App, then using the Azure SDK with C#, you create and access a storage account from an ASP.NET 4.6 web application.
In Chapter 17, you learn how to create and deploy an ASP.NET Web API to the cloud and then consume the Web API from a similar ASP.NET 4.6 web application. The chapter ends discussing two of the most valuable features in the cloud, scaling and the optimal utilization of hardware resources.

 

Data Access (Chapters 18–21) 

Chapter 18 looks at how your applications can save and retrieve data to disk, both as simple text files and as more complex representations of data. You'll also learn how to compress data and how to monitor and act on file system changes. In Chapter 19 you'll learn about the de facto standard for data exchange — namely, XML — and a rapidly emerging format called JSON. By this point in the book, you'll have touched on XML several times in preceding chapters, but this chapter lays out the ground rules and shows you what all the excitement is about.
The remainder of this part looks at LINQ, which is a query language built in to the latest versions of the .NET Framework. You start in Chapter 20 with a general introduction to LINQ, and then you will use LINQ to access a database and other data in Chapter 21.

 

Additional Techniques (Chapters 22–23) 

Chapter 22 is an introduction to Windows Communication Foundation (WCF), which provides you with the tools you need for enterprise-level programmatic access to information and capabilities across local networks and the Internet. You will see how you can use WCF to expose complex data and functionality to web and desktop applications in a platform-independent way.
Chapter 23 shows you how you can create Universal Windows Apps, which are new to Windows. This chapter builds on the foundation of Chapters 14 and 15 to show you how to create Windows Apps that can run on all windows platforms. 

 

What You Need to Use This Book
The code and descriptions of C# and the .NET Framework in this book apply to C# 6 and .NET 4.6. You don't need anything other than the Framework to understand this aspect of the book, but many of the examples require a development tool. This book uses Visual Studio 2015 as its primary development tool; however, if you don't have this, you will be able to use the free Visual Studio Express/Community 2015 line of products. For the first part of the book, Visual Studio Express/Community 2012 for Windows Desktop will enable you to create desktop and console applications. For later chapters, you may also use Visual Studio Express/Community 2015 for Windows 10 in order to create Universal Windows Apps, Visual Studio Express/Community 2015 for Cloud to create cloud applications, and SQL Server Express 2014 for applications that access databases. Some functionality is available only in Visual Studio 2015, but this won't stop you from working through any of the examples in this book.

 

 

لینک دانلود کتاب Beginning C# 6.0 Programming with Visual Studio 2015.pdf

لینک دانلود کدهای کتاب Beginning C# 6 Programming with Visual Studio 2015 (Code Only).rar

 

عضویت در خبرنامه