Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Programming in C#: Exam 70-483 (MCSD) Guide
Programming in C#: Exam 70-483 (MCSD) Guide

Programming in C#: Exam 70-483 (MCSD) Guide: Learn basic to advanced concepts of C#, including C# 8, to pass Microsoft MCSD 70-483 exam

eBook
$26.99 $38.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Programming in C#: Exam 70-483 (MCSD) Guide

Learning the Basics of C#

In simple terms, programming is the art of writing a set of commands that instruct a computer to execute a particular task. In the early days, programming capabilities were limited due to memory and speed restrictions. Due to this, programmers wrote crude and simple tasks that did elementary jobs. With time and with more enhancements, people started writing programs in procedural languages such as COBOL.

Although the languages did the work, the programs had some limitations. There was not much scope for writing reusable components or design patterns that could be used in different places in the application. Hence, the applications were difficult to maintain and scalability was a challenge.

As a result, efforts were made to develop high-level programming languages that could overcome all such challenges faced by procedural languages. With time, many different programming languages were devised. C was developed between 1972 and 1973. At the time, it was a low-level procedural language that depended upon the underlying platform, such as Linux or Windows. C also did not fully utilize the concept of object-oriented programming (which we will go through in Chapter 3, Understanding Object-Oriented Programming).

C++ was introduced in 1998, and provided programmers with the ability to effectively use the concepts of object-oriented programming while still retaining the machine-level programming features provided by C. In this book, we will go through the different aspects of programming in C#. While retaining the OOP capabilities of C++, C# allows us to write programs independent of the underlying hardware implementation.

In this chapter, we will go over the basics of C#. We will review its underlying fundamentals and dive deep into the .NET Framework architecture. We will learn how common language runtime works to translate the application code to machine-level code. We will learn how C# is both different and similar to other languages, such as C and C++. We will then learn about the different components in a C# program, such as classes, namespaces, and assemblies. And, as a common tradition for any new language, we will look at the implementation of a Hello World program.

This chapter consists of the following topics:

  • Comparing C# with C and C++
  • .NET Framework
  • .NET Framework release versions
  • Visual Studio for C#
  • Basic structure of C#
  • Creating a basic program in C#

Technical requirements

For a better understanding of the chapter, you require the following knowledge:

  • A basic understanding of software development
  • A basic understanding of common programming languages: C, C++ and C#

For the entirety of this book, we will be going through different code examples in C# and will be using Visual Studio 2017 Community Edition for the code examples. The following hardware requirements are essential for Visual Studio:

  • Operating system:
    • Windows 10 or higher
    • Windows Server 2016: Standard and Datacenter
    • Windows 8.1
    • Windows Server 2012 R2: Essential, Standard, and Datacenter
    • Windows 7 SP1
  • Hardware requirements:
    • Minimum 2 GB of RAM
    • 1.8 GHz or faster processor
  • Additional requirements:
    • Administrative rights of the system
    • .NET Framework 4.5
  • Visual Studio: All code examples in this book have been compiled on Visual Studio Community Edition 2017. It's available for installation at: https://www.visualstudio.com/downloads/.

Sample code for this chapter can be found on GitHub at https://github.com/PacktPublishing/Programming-in-C-sharp-Exam-70-483-MCSD-Guide/tree/master/Chapter01.

Comparing C# with C and C++

In this section, we will explore how C# compares against other programming languages, such as C and C++. We will look at aspects that make C# similar, and also areas in which it differs from these languages.

C# versus C

If you have done some previous development on C# and C , you will realize that they follow similar code syntax, such as the use of semi-colons, and similar declarations of methods; the two languages are very different from one another. Just like in C, we can declare data variables with the same type, such as Char, and Integer. The following features make C# different from C:

Feature

C#

C

Object-oriented programming

Object-oriented programming is the main essence of any high-level programming language, and C# allows us to utilize the capabilities of OOP using the four main pillars of encapsulation, polymorphism, inheritance, and abstraction. In Chapter 3, Understanding Object-Oriented Programming, we will look at this in detail.

C as a programming language

does not support polymorphism, encapsulation, and inheritance.

It does not provide features such as function overloading, virtual functions, and inheritance.

Exception handling

Exception handling is the process of handling runtime errors that occur during the execution of the application. C# provides us with exception handling features that help us handle these scenarios in a better way. In Chapter 7, Implementing Exception Handling, we will look at this in detail.

C also does not provide any exception handling features.

Type safety

Every variable declared in a program has a type. In a typical type-safe language during the program compilation stage itself, the compiler will validate the values being assigned to variables and raise a compile time error if an incorrect type is assigned to it. C# is a type-safe language. However, in Chapter 8, Creating and Using of Types in C#, we will learn that it also allows you to use pointers using a keyword, UnSafe.

C language implements type safety, albeit with some exceptions. There are certain in-built functions such as printf that do not enforce that only character strings are passed to them.

Let's now look at how C# compares against another language, C++. After exploring the comparison between C# and C++, we will also explore how the .NET Framework makes C# a platform-independent language compared to C and C++.

C# versus C++

In most programming scenarios, C++ can be classified as an extension of C and can execute all the code that was written in C. It provides all the features of object-oriented programming while retaining the functionalities provided by C. There are several features that are common between C# and C++. Just as in C#, we can implement object-oriented programming, exception handling, and type safety in C++. However, there are also certain things that make C# different to C++ and more similar to Java.

Before we look at the differences and similarities between C# and C++, we must understand some key concepts pertaining to object-oriented programming.

The languages that implement object-oriented programming are classified in two categories:

  • Fully object-oriented languages
  • Pure object-oriented languages

A language is classified as a fully object-oriented programming language if it implements at least the four core pillars of Abstraction, Encapsulation, Polymorphism, and Inheritance.

On the other hand, a language can be defined as a pure object-oriented programming language when, apart from being fully object-oriented programming, it only contains classes and objects. This means that all methods, properties, and attributes declared must be inside a class and also should not have any predefined data types, such as char and int.

In the case of C#, we can have predefined data types. In Chapter 2, Understanding Classes, Structures, and Interfaces, we will look into those predefined data types in detail. This makes C# a fully object-oriented language and not a pure object-oriented language.

On the other hand, in the case of C++, we can define methods that are not part of any class. This, too, makes it a fully object-oriented language.

Now, let's look at some of the similarities and differences between C# and C++:

Feature

C#

C++

Object-oriented programming

As described previously, C# is a fully object-oriented language.

Similar to C#, C++ is also a fully object-oriented language.

Memory management

C# has got an inbuilt garbage collector that manages the allocation and deallocation of memory. In Chapter 9, Managing the Object Life Cycle, we will understand memory management in C# in detail.

C++ does not have a built-in garbage collector. Due to this, developers are responsible for handling the allocation and deallocation of memory.

Inheritance

C# does not support multiple inheritance. In Chapter 2, Understanding Classes, Structures, and Interfaces, we will learn what it means; however in simple terms, it means that a class can only inherit from one class at a time.

Compared to C# , C++ allows us to implement multi-level inheritance.

Use of pointers

Although C# allows us to use pointers in our code, we need to declare the code with a snippet of UnSafe. We will look into this in detail in Chapter 8, Creating and Using of Types in C#.

C++ allows us to use pointers anywhere without any implicit declaration in the code.

In the previous two sections, we saw how C# compares to both C and C++. However, there is one important difference that we haven't yet explored. That feature is platform independence and was one of the main reasons C# was introduced by Microsoft. When working with C and C++, we need to compile the code in accordance with the underlying platform features, such as the operating system.

Suppose we write an application in C or C++ and compile it. During the compilation stage, the compiler translates the code into a native language code that is only compatible with the underlying platform. This basically implies that an application in C++, developed and compiled on a Windows machine, will just be compatible with a Windows machine. If the compiled bits are used on a different system, such as Linux, it will not work there.

This difference is caused due to the varying nature of compilers and their compatibility with underlying operating systems, such as Linux and Windows. These are some of the common compilers in Linux and Windows that are available for C and C++:

  • Linux: GCC, Failsafe C, and SubC
  • Windows: Microsoft Windows SDK, Turbo C++, and SubC

Before C# was developed, this platform dependence issue was a major disadvantage compared to some of the other programming languages, such as Java. In Java, when an application is compiled, it's not directly converted into machine code. Instead, it's converted into an intermediate language known as ByteCode. The ByteCode is platform-independent and can be deployed on different platforms.

When Microsoft introduced C#, they inculcated the same principle in the language. When an application written in C# is compiled, instead of being converted to the native code compatible with the machine, the application is first translated to an intermediate language commonly known as IL code.

After the IL code is generated, the Common Language Runtime (CLR) comes into effect. CLR is a runtime environment that sits in the memory of the underlying machine and converts the IL code to the native code, which is specific to the machine. This process is Just-In-Time (JIT) compilation. In the next section, we will look at the underlying platform of the .NET Framework, which handles all this for a C# application.

.NET Framework

.NET Framework is a software development framework on which we can write a number of languages such as C#, ASP.NET, C++, Python, Visual Basic, and F#.

Microsoft released the first version of .NET 1.0 in 2002. The current version of .NET Framework is 4.8. The code written in this book will be based on this version of .NET Framework 4.7.2.

.NET Framework provides language interoperability across different programming languages. Applications written in .NET Framework execute in an environment or a virtual machine component known as CLR.

The following diagram illustrates the different components in .NET Framework:

In the previous diagram, note the following:

  • At the top of the hierarchy, we have applications or the program code that we write in .NET. It could be as simple as a Hello World console application program, which we will create in this chapter, or as complex as writing multi-threaded applications.
  • The applications are based upon a set of classes or design templates, which constitutes a class library.
  • The code written in these applications is then acted upon by CLR, which makes use of the Just in Time (JIT) compiler to convert the application code into machine code.
  • The machine code is specific to the underlying platform properties. So, for different systems, such as Linux or Windows, it will be different.
For further information on .NET Framework, please refer to the official docs from Microsoft: https://docs.microsoft.com/en-us/dotnet/framework/get-started/overview.

In the next section, we will the .NET Framework in detail learn how interact with each other.

Languages/applications

Languages indicate the different types of applications that can be built in .NET Framework. If you are new to .NET Framework, you may not be familiar with some of the applications listed here:

  • ADO.NET: In an ADO.NET application, we write programs to access data from sources such as SQL Server, OLE DB, and XML sources.
  • ASP.NET: In an ASP.NET application, we write programs to build web apps such as websites and services using C#, HTML, CSS, and so on.
  • CORE: In .NET Core applications, we write programs that support cross-platform functionality. The programs could be web apps, console applications, or libraries.
  • Windows Forms: In Windows Forms applications, we write programs that provide client-side applications for desktops, tablets, and mobile devices.
  • WPF: In WPF or Windows Presentation Foundation, we write programs that provide user interfaces in Windows-based applications. It runs only on Windows-supported platforms, such as Windows 10, Windows Server 2019, and Windows Vista.
  • WCF: In WCF or Windows Communication Foundation, we write programs that provide a set of APIs, or in simpler terms, services, to exchange data between two distinct systems.
  • LINQ: In LINQ, we write programs that provide data querying capabilities on .NET applications.
  • Parallel FX: In Parallel FX, we write programs that support parallel programming. It involves writing programs that utilize the CPU's capabilities to the fullest by executing several threads in parallel to complete a task.

The class library

The class library in .NET Framework consists of a collection of interfaces, classes, and value types on which the applications are built.

These collections are organized in different containers known as namespaces. They are a set of standard class libraries that can be used for different purposes in an application. Here are some of the namespaces:

  • Microsoft.Sharp: This contains a type that supports compilation and code generation for C# source code, and the type that supports conversion between Dynamic Language Runtime and C#.
  • Microsoft.Jscript: This contains classes that support compilation and code generation using JavaScript.
  • Microsoft.VisualBasic: This contains classes that support compilation and code generation for Visual Basic.
  • Microsoft.VisualC: This contains classes that support compilation and code generation for Visual C++.

Common Language Runtime (CLR)

CLR is a runtime environment that sits in the memory of the underlying machine and converts the IL code to native code. The native code is specific to the underlying platform in which the code is running. This provides a platform independence feature in a typical application made on .NET Framework. Some of the other features provided by CLR are mentioned here:

  • Memory management: CLR provides automatic allocation and release of memory across the application. Due to this, developers do not need to explicitly write code to manage memory. This eliminates issues that can lead to degradation of application performance due to memory leaks. CLR manages the allocation and removal of memory using a garbage collector, which manages the memory allocation in the following manner:
    • Allocating memory: When an application is executed in CLR, it reserves a continuous space of memory for its execution. The reserved space is known as a managed heap. The heap maintains a pointer to the memory address where the next object defined in the process will be allocated.
    • Releasing memory: During the runtime execution of the program, the garbage collector runs at scheduled times and examines whether the memory allocated in heaps are still in scope of program execution or not.
    • It determines whether the program is still using the memory on the basis of roots or the collection of memory objects are still in the scope of the program. If any memory allocation is not reachable as per the collection in the root, the garbage collector determines that the memory allocated in that memory space can be released.
    • We will look into memory management in detail in Chapter 9, Manage the Object Life Cycle.
  • Exception handling: When an application is being executed, it may result in certain execution paths that could generate some errors in the application. Some of the common examples are as follows:
    • When an application tries to access an object such as a file that is not present in the specified directory path.
    • When an application tries to execute a query on the database but the connection between the application and the underlying database is broken/not open.
    • We will look into exception handling in detail when we go through Chapter 7, Implementing Exception Handling.

In the next section, we will look at the release history of .NET Framework and its compatibility with different versions of CLR and C#.

.NET Framework release versions

The first version of .NET Framework 1.0 was released in 2002. Just like .NET Framework, there are different versions of CLR and C# as well. The different versions of .NET Framework are compatible with some particular versions of both CLR and C#. The following table provides a compatibility mapping between the different .NET Framework versions and its compatible versions of CLR:

.NET Framework

CLR version

1.0

1.0

1.1

1.1

2.0/3.0/3.5

2.0

4.0/4.5/4.5.1/4.5.2/4.6/4.6.1/4.6.2/4.7/4.7.1/4.7.2/4.8

4

The following table matches the different versions of .NET Framework with its compatible C# version, and lists some of the important programming features that were released in that version of C#:

Version

.NET Framework

Important features in C#

C# 1.0/1.1/1.2

.NET Framework 1.0/1.1

First release of C#

C# 2.0

.NET Framework 2.0

Generics anonymous methods, Nullable types, and Iterators

C# 3.0

.NET Framework 2.0/3.0/3.5/4.0

Query expressions, Lambda expression, and Extension methods

C# 4.0

.NET Framework 2.0/3.0/3.5/4.0

Dynamic binding, Named/optional arguments, and Embedded interop types

C# 5.0

.NET Framework 4.5

Asynchronous members

C# 6.0

.NET Framework 4.6/4.6.2/4.7/4.7.1/4.7.2

Exception filters, String interpolation, nameof operator, and Dictionary initializer

C# 7.0/7.1/7.2/7.3

.NET Framework 4.6/4.6.2/4.7/4.7.1/4.7.2

Out variables, Pattern matching, Reference locals and returns, and Local functions

C# 8

.NET Framework 4.8

Read-only members and Default interface members

In the next section, we will look at Visual Studio, an IDE tool provided by Microsoft for building applications with .NET Framework, and some of its built-in features that can help us during the development phase.

Visual Studio for C#

Microsoft Visual Studio is an Integrated Development Environment (IDE) tool used by developers worldwide to develop, compile, and execute their .NET Framework applications. There are several features provided in the tool that help developers not only improve the quality of the application developed, but also greatly reduce the time of development.

Some of the key features of Visual Studio are mentioned here:

  • It uses Microsoft software development platforms such as Windows API, Forms, WPF, and Silverlight.
  • While writing code, it provides IntelliSense code-completion features, which help the developers write code efficiently.
  • It also provides a forms designer for building GUI applications, a class designer, and database schema designer.
  • It provides support for different source control systems, such as GitHub and TFS.

The current version of Visual Studio is 2017. For development purposes, Microsoft provides a Community Edition of Visual Studio, which is free of cost and can be used for non-commercial activities.

It's essential that before using the Community Edition, we go through the terms and conditions of use as well: https://visualstudio.microsoft.com/license-terms/mlt553321/.

In the next section, we will do a walk-through on the basic syntax involved in writing a basic C# application.

Basic structure of C#

In this section, we will go over a basic programming syntax of a C# application, namely: classes, namespaces, and assemblies.

As C# is an object-oriented language, and at the basic level it contains building blocks known as classes. The classes interact with one another, and as a result, provide functionality at runtime. A class consists of two components:

  • Data attributes: Data attributes refer to the different properties defined in the class object.
  • Methods: Methods indicate the different operations that are to be executed in the class object.

As an example, we will look at the representation of a car as an object in C#. At a very basic level, a car will have attributes such as the following:

  • Make: For example Toyota, Ford, or Honda.
  • Model: For example Mustang, Focus, or Beetle.
  • Color: Color of the car, such as Red or Black.
  • Mileage: Distance covered per liter of fuel consumed.

Please note that a car can have more attributes, but as this example is just being used for the sake of explanation, we have included these basic attributes. While writing a C# application, all of these will be captured as attributes for the Car class.

Similarly, to make sure the Car class achieves all of the desired features, it will need to implement the following operations:

  • StartEngine: This function represents how the car starts moving.
  • GainSpeed: This function represents how the car accelerates.
  • ApplyBrake: This function represents how the car applies brakes to slow down.
  • StopEngine: This function represents how the car stops.

While writing any application in C#, the starting point is always to capture all the actors/objects that are interacting with each other. Once we identify the actors, we can then identify the data attributes and methods that each of them must have so that they can exchange the required information with each other.

For the Car example being discussed, the following would be the definition of the Car class. For the sake of explanation, we have just assumed that the attributes will be of type String; however, when we go through Chapter 2, Understanding Classes, Structures, and Interfaces, we will go over some more data types that can be declared in a class. For the car example, the following syntax would be a representative program in a C# application:

class Car
{
string Make;
string Model;
string Color;
float Mileage;
void StartEngine()
{
// Implement Start Engine.
}

void GainSpeed()
{
// Implement Gain Speed.
}

void ApplyBrake()
{
// Implement Gain Speed.
}

void StopEngine()
{
// Implement Gain Speed.
}
}

In any application, there can be some classes that are related to one another. They can be based in terms of similar functionality, or they could be dependent on each other. In C#, we handle such a segregation of functionality via namespaces. For example, we can have a namespace for handling all operations related to reading/writing logs in the file directory. Similarly, we can have namespaces for handling all operations related to capturing user-specified information from inputs.

When our applications continue to evolve and we have several namespaces, we may have a need to group related namespaces under one umbrella. This ensures that if any class changes under any particular namespaces, it will not affect all the classes defined in the application. This structuring of namespace is done via assemblies in C#. Assemblies are also known as DLLs, or dynamically linked libraries. Depending upon how we structure our code, when an application is compiled, it results in multiple DLLs.

Creating a basic program in C#

Now we will look at how to create a basic program in C#. For the sake of explanation, we will work on the Console Application project:

  1. To create a new project, click on File | New Project and select Console App (.NET Framework) as the project type:

After giving the solution an appropriate name and path, click on OK. Check that the solution has been created. At this point, you should see the Solution Explorer. By default, a .cs file, Program.cs, should be added to the solution. By default, a method by the name of Main will also be added to the class. This method is the first entry point when this application is executed.

Please note that for a console program, it's not possible to change the default method, which would be the first entry point for the application.
  1. Let's open Program.cs at this stage. By default, the project will have the following using expressions for the following namespaces:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

A using statement basically signifies that the program can use the classes and methods defined in those namespaces for any execution. In further chapters, we will go over namespaces in detail and learn how to use them.

  1. Now, have a look at the program structure. By default, each class needs to be associated with a namespace. The namespace expression present in the Program.cs class indicates the namespace this class is part of:
Please note that C# is a case-sensitive language. This basically means that if we change the name of the method from Main to main, CLR will not be able to execute this method.

Each method in C# consists of two parts:

  • Input parameters: This is a list of variables that will be passed to the function when it's executed.
  • Return type: This is the value that will be returned by the function to the caller when the function finishes its processing.

In the case of the Program function declared previously, the input variable is a collection of arguments. The output variable is void; in other words, it does not return anything. In the forthcoming chapters, we will go over functions in more detail.

Now, let's write a program syntax to execute the famous Hello World output. In a console application, we can do this using Console.Writeline:

  1. The code implementation for this program is as follows:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
}
}
}
  1. At this stage, we have finished the program and are ready to execute it. Click on Build | Build Solution. Check that there are no compile time errors:
  1. At this stage, internally, Visual Studio should have created an .exe application for the project:
  1. Open Command Prompt and navigate directly to where the .exe file has been created. Execute the .exe file and check that the desired output of Hello World appears in Command Prompt.

Summary

Before we move to the next chapter, let's summarize what we have learned during this chapter. We had a brief recap on the building blocks of C#. We had a walk-through of the .NET Framework architecture and visited the different components in it. We also analyzed what makes C# different from programming languages such as C and C++. We went over the functioning of CLR and how it implements garbage collection in C#. We then wrote our first program, Hello World. By now, you should have a good awareness of what C# is and the features it contains.

In the next chapter, we will go over some more basic principles of C# programming. We will analyze the different possible access modifiers in C#. Access modifiers make sure that the properties and methods present in a class are only exposed to the relevant modules in an application. We will learn the behavior and implementation of value and reference type data variables in C# programming. We will go over inheritance and interface, and how they are implemented in a C# application. We will discuss the differences between inheritance and interface, and the different scenarios in which we should use one or the other.

Questions

  1. Which of the following statements is correct with regard to C, C++, and C#?
    • C is an object-oriented language.
    • C++ applications are independent of the underlying system.
    • C# applications are independent of the underlying system.
    • C implements all the functionality and features of C++ and C#.
  2. An assembly consists of related namespaces and classes that interact with each other to provide a certain functionality.
    • True
    • False
  3. For a console project, we can set any function as the starting point of execution for the application.
    • True
    • False

Answers

  1. C is not an object-oriented language. C and C++ are not independent of the underlying platform, unlike C#, which implements the feature using Common language runtime. C is a subset of the functionality and features provided by C# and C++.
  2. True. An assembly consists of a number of related namespaces and classes grouped together.
  3. False. For a console application, the point of entry is always the main program.
Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Prepare for the certification using step-by-step examples, and mock tests with standard solutions
  • Understand the concepts of data security for secure programming with C#
  • Learn to scale and optimize your application codebase using best practices and patterns

Description

Programming in C# is a certification from Microsoft that measures the ability of developers to use the power of C# in decision making and creating business logic. This book is a certification guide that equips you with the skills that you need to crack this exam and promote your problem-solving acumen with C#. The book has been designed as preparation material for the Microsoft specialization exam in C#. It contains examples spanning the main focus areas of the certification exam, such as debugging and securing applications, and managing an application's code base, among others. This book will be full of scenarios that demand decision-making skills and require a thorough knowledge of C# concepts. You will learn how to develop business logic for your application types in C#. This book is exam-oriented, considering all the patterns for Microsoft certifications and practical solutions to challenges from Microsoft-certified authors. By the time you've finished this book, you will have had sufficient practice solving real-world application development problems with C# and will be able to carry your newly-learned skills to crack the Microsoft certification exam to level up your career.

Who is this book for?

The book is intended to the aspirants of Microsoft certifications and C# developers wanting to become a Microsoft specialist. The book does not require the knowledge of C#, basic knowledge of software development concepts will be beneficial

What you will learn

  • Explore multi-threading and asynchronous programming in C#
  • Create event handlers for effective exception handling
  • Use LINQ queries for data serialization and deserialization
  • Manage filesystems and understand I/O operations
  • Test, troubleshoot, and debug your C# programs
  • Understand the objectives of Exam 70-483 and apply common solutions
Estimated delivery fee Deliver to Ukraine

Economy delivery 10 - 13 business days

$6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 31, 2019
Length: 444 pages
Edition : 1st
Language : English
ISBN-13 : 9781789536577
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Ukraine

Economy delivery 10 - 13 business days

$6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Oct 31, 2019
Length: 444 pages
Edition : 1st
Language : English
ISBN-13 : 9781789536577
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 181.97
C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development
$87.99
Programming in C#: Exam 70-483 (MCSD) Guide
$54.99
Hands-On Design Patterns with C# and .NET Core
$38.99
Total $ 181.97 Stars icon
Banner background image

Table of Contents

21 Chapters
Learning the Basics of C# Chevron down icon Chevron up icon
Understanding Classes, Structures, and Interfaces Chevron down icon Chevron up icon
Understanding Object-Oriented Programming Chevron down icon Chevron up icon
Implementing Program Flow Chevron down icon Chevron up icon
Creating and Implementing Events and Callbacks Chevron down icon Chevron up icon
Managing and Implementing Multithreading Chevron down icon Chevron up icon
Implementing Exception Handling Chevron down icon Chevron up icon
Creating and Using Types in C# Chevron down icon Chevron up icon
Managing the Object Life Cycle Chevron down icon Chevron up icon
Find, Execute, and Create Types at Runtime Using Reflection Chevron down icon Chevron up icon
Validating Application Input Chevron down icon Chevron up icon
Performing Symmetric and Asymmetric Encryption Chevron down icon Chevron up icon
Managing Assemblies and Debugging Applications Chevron down icon Chevron up icon
Performing I/O Operations Chevron down icon Chevron up icon
Using LINQ Queries Chevron down icon Chevron up icon
Serialization, Deserialization, and Collections Chevron down icon Chevron up icon
Mock Test 1 Chevron down icon Chevron up icon
Mock Test 2 Chevron down icon Chevron up icon
Mock Test 3 Chevron down icon Chevron up icon
Assessments Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(1 Ratings)
5 star 0%
4 star 0%
3 star 100%
2 star 0%
1 star 0%
Brian A. Lee Nov 24, 2020
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
I am not impressed with this book. There are a few chapters (ch. 5 & 6) were decent, but overall the rest of the book is meh. I found numerous errors in example code in the chapters and mock tests have ambiguous answer choices (some code choices do exactly same thing when I ran the code in LinqPad).Overall, some topics are explained well in good detail, while other topics/chapters are a best vague and at worse typos and erroneous.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact [email protected] with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at [email protected] using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on [email protected] with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on [email protected] within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on [email protected] who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on [email protected] within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela