Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Beginning C# 7 Hands-On ?????? The Core Language
Beginning C# 7 Hands-On ?????? The Core Language

Beginning C# 7 Hands-On ?????? The Core Language: Learn the C# language by coding it element by element

eBook
€8.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

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

Beginning C# 7 Hands-On ?????? The Core Language

Why C# and How to Download and Install the Visual Studio Community Edition

If you visit a page like indeed.com and enter C# in the what box, you'll get results that show that there are many jobs in this field, as shown in Figure 1.1.1. This shows that C# is a very valuable skill to master. Perhaps you just like to tinker, and C# is great for that as well:

Figure 1.1.1: The many job listings for C# programmers

Locating and downloading the Visual Studio Community edition

In this chapter, we're going to take a look at how to get Visual Studio 2017. You can either go directly to www.visualstudio.com/downloads or just do a search for Visual Studio 2017 download. This should bring you to a page similar to this one:

Figure 2.1:

Keep in mind that these pages are updated regularly. In the preceding screenshot, you will see that there are several versions. The one that interests us, of course, is Visual Studio Community 2017, the free version.

Click on Free download. This should automatically download a small installer. Depending on how your system is set up, it will either download it directly to the Downloads folder, or prompt you for where you want to save it. I've created a VS_Community folder inside My Downloads folder and saved it there. Of course, you can save it wherever you want to. Once this is done--it won't take long as it's just a small file--locate the downloaded VS_Community.EXE file and open it up.

Once you open it, you should see this screen.

Figure 2.2: The License screen

Click on Continue, which should take you through to the next screen:

Figure 2.3: Choosing download components

From here, you can select the set of features you want to install on your system. For our purposes, I've chosen.NET desktop development at the top. If you click on it, you should see a check mark appear in the top corner to show that it's been selected:

Figure 2.4: Selecting .NET desktop development

Down at the bottom of the window, there's a location bar. If you click on the three little dots, you can select where you want the Visual Studio program to be installed on your system. On the right-hand side, you have a summary field:

Figure 2.5: Selecting the following frameworks

This tells you what's going to be installed; also, down at the bottom, it says Total install size, 3.06 GB, so that's how much minimum free space you need wherever you're going to install this. Then, of course, click on the Install button in the lower right-hand corner. This should bring you to a page similar to this one:

Figure 2.6: Installation in progress

Now, it's just a matter of waiting for everything to be downloaded and then applied to your system. One thing that I recommend you do at this point is temporarily disable your antivirus software while this is being installed because it could interfere with the installation process. I got to about 90 percent and my system hung when I installed it. I went back and disabled my anti-virus software and it installed fine. You may have to do the same.

Once it's downloaded and installed, you should see a screen similar to this one:

Figure 2.7: The Welcome screen

From here on, of course, you can either look at the release notes if you want, or just click on the Launch button. Go ahead and click on the Launch button. This should bring you to a screen similar to this one:

Figure 2.8: The Sign in screen

If you want, you can sign in with your Microsoft account,if you remember. I chose Not now, maybe later. The next step is to choose the interface:

Figure 2.9: Choose color theme

I like the standard Blue one. Of course, you can use the Dark one or the Light one, whichever one you like, and then click on Start Visual Studio. Once it's loaded, it should look very similar to the one that you see right here:

Figure 2.10: Getting Started

Now Go to Help > About Microsoft Visual Studio; you'll see the version that you have installed. Mine is 15.3.0, which is the latest version at the time of this writing. Make sure that yours is the same or above (it should be, as you just downloaded the latest version from Microsoft); otherwise, the code samples that we create will not work because they rely on the features of C# available in this version. Okay, close the About box. That's it! You're now ready to start learning C# 7.

Summary

In this chapter, you learned how to locate, download, install, and launch Visual Studio Community.
In the next chapter, we'll take greater control of Visual Studio and configure it to some extent.

Left arrow icon Right arrow icon

Key benefits

  • • Learn C#, Visual Studio, and Object Oriented Programming,
  • • See practical examples of all the core C# language features so that you can easily master them yourself
  • • Use the C# 7 programming language to work with code and data, which can be applied to other programming languages as well,
  • • Complete a variety of programming assignments for hands-on practice, as you move through the course.

Description

Beginning C# 7 Hands-On - The Core Language teaches you core C# language and syntax in a working Visual Studio environment. This book covers everything from core language through to more advanced features such as object-oriented programming techniques. This book is for C# 7 beginners who need a practical reference to core C# language features. You'll also gain a view of C# 7 through web programming with web forms, so you'll learn HTML, basic CSS, and how to use a variety of controls, such as buttons and drop-down lists. You'll start with the fundamentals of C# and Visual Studio, including defining variables, interacting with users, and understanding data types, data conversions, and constants. You'll move on to checking conditions using if/else blocks, and see how to use loops to do things such as repeat blocks of code. After covering various operators to evaluate and assign control structures, you'll see how to use arrays to store collections of data. By the time you’ve finished the book, you’ll know how to program the vital elements of the core C# language. These are the building blocks that you can then combine to build complex C# programs.

Who is this book for?

This book will appeal to anyone who is interested in learning how to program in C#. Previous programming experience will help you get through the initial sections with ease, although, it’s not mandatory to possess any experience at all.

What you will learn

  • • Learn C#, Visual Studio, and object-oriented programming
  • • Learn all the core C# 7 language syntax with hands-on working examples
  • • Learn everything from basic variable assignments to complex multidimensional arrays
  • • Go through practical examples of all the core C# 7 language features so that you can easily master them yourself
  • • Use the C# programming language to work with code and data, which can be applied to other programming languages as well

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 31, 2017
Length: 566 pages
Edition : 1st
Language : English
ISBN-13 : 9781788290838
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Aug 31, 2017
Length: 566 pages
Edition : 1st
Language : English
ISBN-13 : 9781788290838
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.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
€189.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
€264.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 98.97
Beginning C# 7 Hands-On ??? Advanced Language Features
€32.99
Learn C# in 7 days
€32.99
Beginning C# 7 Hands-On ?????? The Core Language
€32.99
Total 98.97 Stars icon
Banner background image

Table of Contents

59 Chapters
Why C# and How to Download and Install the Visual Studio Community Edition Chevron down icon Chevron up icon
Customizing Visual Studio to Make it Feel More Personal Chevron down icon Chevron up icon
Creating and Running Your First Page Chevron down icon Chevron up icon
Creating and Running a Page That Incorporates C# Chevron down icon Chevron up icon
Creating and Using a Single Variable Chevron down icon Chevron up icon
String Interpolation and Updating Visual Studio Chevron down icon Chevron up icon
Formatting Output Strings for More Professional Results Chevron down icon Chevron up icon
Using Variables and Data Types Chevron down icon Chevron up icon
Computed Variables and Basic Math Chevron down icon Chevron up icon
Interacting with Users Through the Web Page Chevron down icon Chevron up icon
Using Method Chaining to Write More Compact Code Chevron down icon Chevron up icon
Reacting to a Single Condition with If/Else Blocks Chevron down icon Chevron up icon
Making a Variable Grow by Adding 1 Chevron down icon Chevron up icon
Repeating Blocks of Code with While Loops Chevron down icon Chevron up icon
Repeating Blocks of Code with For Loops Chevron down icon Chevron up icon
Iterating Over Collections with foreach Loops Chevron down icon Chevron up icon
Examining Multiple Variable Values with Switch Blocks Chevron down icon Chevron up icon
Improving Input Processing with TryParse Chevron down icon Chevron up icon
Replacing If/Else Blocks with the Ternary Operator Chevron down icon Chevron up icon
Operators That Evaluate and Assign in Place Chevron down icon Chevron up icon
Checking Two Conditions with the Logical AND Operator Chevron down icon Chevron up icon
Checking Two Conditions with the Logical OR Operator Chevron down icon Chevron up icon
Declaring, Setting, and Reading Arrays Chevron down icon Chevron up icon
Iterating Over Arrays with foreach Loops Chevron down icon Chevron up icon
Creating and Using a Simple Method Chevron down icon Chevron up icon
Passing Arrays into Methods Chevron down icon Chevron up icon
Reference Type and Value Type Variables Chevron down icon Chevron up icon
Creating More Flexible Methods with the params Keyword Chevron down icon Chevron up icon
Creating More Flexible Functions with the out Keyword Chevron down icon Chevron up icon
Combining the ref and out Keywords to Write Flexible Functions Chevron down icon Chevron up icon
The out Keyword in C# 7 Chevron down icon Chevron up icon
Multidimensional Arrays Chevron down icon Chevron up icon
Writing Easier Code with the Var and Dynamic Keywords Chevron down icon Chevron up icon
Creating a Class with a Constructor and a Function Chevron down icon Chevron up icon
Creating a Class with a Static Method Chevron down icon Chevron up icon
Creating a Class with an Object Property Chevron down icon Chevron up icon
Creating a Class with Static Fields, and Properties Chevron down icon Chevron up icon
Centralizing Common Code with Inheritance Chevron down icon Chevron up icon
Centralizing Default Code with Virtual Functions Chevron down icon Chevron up icon
Model Concepts with Abstract Classes Chevron down icon Chevron up icon
Using Custom Types as Return Types Chevron down icon Chevron up icon
Using Lists to Operate on Data Efficiently Chevron down icon Chevron up icon
Writing Less Code with Polymorphism Chevron down icon Chevron up icon
Using Interfaces to Express Common Behaviors Chevron down icon Chevron up icon
Iterating over Instances with Indexers Chevron down icon Chevron up icon
Building Stabler Apps with Exception Handling Chevron down icon Chevron up icon
Using Named and Optional Parameters Chevron down icon Chevron up icon
Using the Null Coalescing Operator to Write Stabler Applications Chevron down icon Chevron up icon
Overloading Operators to Perform Custom Operations Chevron down icon Chevron up icon
Using Enumerations to Represent Named Constants Chevron down icon Chevron up icon
Creating and Using Namespaces Chevron down icon Chevron up icon
Structs, Random Points, and Sleeping Threads Chevron down icon Chevron up icon
Declaring, Creating, and Using Delegates Chevron down icon Chevron up icon
Switch Blocks with when in C# 7.0 Chevron down icon Chevron up icon
Switch Blocks with Objects in C# 7.0 Chevron down icon Chevron up icon
Tuples in C# 7.0 Chevron down icon Chevron up icon
Local functions in C# 7.0 Chevron down icon Chevron up icon
Throwing Exceptions in C# 7.0 Chevron down icon Chevron up icon
Tuples in C# 7.0, Part 2 Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
(2 Ratings)
5 star 0%
4 star 0%
3 star 50%
2 star 0%
1 star 50%
Martin Richard Sanders Nov 14, 2018
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
I was expecting a book containing a lot of C# syntax, but sadly the book mostly covers building C# apps for the web, so all of the examples are HTML web front end.
Amazon Verified review Amazon
Doggy Daddy May 01, 2019
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
There are several issues with this book. If you are considering buying it, realize that the title itself is deceiving in multiple ways. First, learning the core C# language is not about creating web pages - which is what this book is about. Learning the core elements of a language does not involve web pages or various types of GUI (or visual presentation) forms or such. This book just misses that mark completely. Also, the word "core" has come to mean a totally different thing than how they are using it here. Look it up in Amazon books or just google it. In the .net / C# context, it does not mean "at the heart of" or "central to" as one would think. Bad, deceiving book. Look elsewhere.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.