Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Beginning C# 7 Hands-On ??? Advanced Language Features

You're reading from   Beginning C# 7 Hands-On ??? Advanced Language Features Learn the advanced-level features of C# 7 using Visual Studio 2017

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781788294263
Length 310 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Tom Owsiak Tom Owsiak
Author Profile Icon Tom Owsiak
Tom Owsiak
Arrow right icon
View More author details
Toc

Table of Contents (30) Chapters Close

Preface 1. Creating a Simple Generics Class 2. Creating a Generic Method FREE CHAPTER 3. Implementing a Generic Interface to Accomplish Sorting 4. Making Delegates More Flexible with Generics 5. Creating and Using Generic Dictionaries 6. Connection Between Delegates and Lambda Expressions 7. Expression-Bodied Lambdas and Expression-Bodied Members 8. Anonymous Methods and Objects That Run Their Own Delegates 9. C# with LINQ and Built-In Types 10. C# with LINQ and Custom Data Types 11. Using Query Syntax to Construct Queries 12. Queries That Perform Aggregation Functions 13. Using LINQ to Summarize Tuples 14. Summarizing Results with Grouping 15. Joining Datasets with Inner Joins 16. Downloading, Installing, and Running SQL Server 2017 17. Writing Code to Manually Connect to a Table and Retrieve Records 18. Inserting Records into Tables Using Stored Procedures 19. Using the Nullable Feature to Make Apps More Stable 20. Connecting a Chart Control to SQL Server 21. Using LINQ to Operate on Tables from SQL Server 22. Creating a Page That Saves Text to Disk 23. Creating a Page That Uses the File Upload Control 24. Serializing and Deserializing Objects 25. Having a Little Fun with Images with Pixel Manipulations 26. Saving an Image to SQL Server 27. Creating and Using an XML File 28. Creating XML Files with C# 29. Querying XML Documents with LINQ

Chapter review

For review, the complete version of the Default.aspx.cs file for this chapter, including comments, is shown in the following code block:

//using is a directive
//System is a name space
//name space is a collection of features that our needs to run
using System;
using System.Collections.Generic;
using System.Threading;
//public means accessible anywhere
//partial means this class is split over multiple files
//class is a keyword and think of it as the outermost level of grouping
//:System.Web.UI.Page means our page inherits the features of a Page
public partial class _Default : System.Web.UI.Page
{
private void ShowSquare(double x) =>
sampLabel.Text += "<br>" + (x * x);//expression bodied function
protected void Button1_Click(object sender, EventArgs e)
{
//make list of double values
List<double> vals =
new List&lt...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime