Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Beginning C# 7 Hands-On ??? Advanced Language Features
  • Table Of Contents Toc
  • Feedback & Rating feedback
Beginning C# 7 Hands-On ??? Advanced Language Features

Beginning C# 7 Hands-On ??? Advanced Language Features

By : Tom Owsiak
close
close
Beginning C# 7 Hands-On ??? Advanced Language Features

Beginning C# 7 Hands-On ??? Advanced Language Features

By: Tom Owsiak

Overview of this book

Beginning C# 7 Hands-On – Advanced Language Features assumes that you’ve mastered the basic elements of the C# language and that you're now ready to learn the more advanced C# language and syntax, line by line, in a working Visual Studio environment. You'll learn how to code advanced C# language topics including generics, lambda expressions, and anonymous methods. You'll learn to use query syntax to construct queries and deploy queries that perform aggregation functions. Work with C# and SQL Server 2017 to perform complex joins and stored procedures. Explore advanced file access methods, and see how to serialize and deserialize objects – all by writing working lines of code that you can run within Visual Studio. This book is designed for beginner C# developers who have mastered the basics now, and anyone who needs a fast reference to using advanced C# language features in practical coding examples. You'll also take a look at C# through web programming with web forms. By the time you’ve finished this book, you’ll know all the critical advanced elements of the C# language and how to program everything from C# generics to XML, LINQ, and your first full MVC web applications. These are the advanced building blocks that you can then combine to exploit the full power of the C# programming language, line by line.
Table of Contents (30 chapters)
close
close

Creating an array

There is a lot of code to enter in this chapter, but it's mechanical. First, we will create an array, so enter the following between the curly braces under the line beginning with protected void Button1_Click...:

IEnumerable<int> scores = new int[] { 45, 98, 99, 78, 89, 87, 77, 67, 71, 81 };

Here, IEnumerable is the data type and scores is the name of the array. It doesn't matter what values you put into the array.

Averaging the values in a list

Now, first we will find an average of this list. So, enter the following next:

var goodStudentAverage = (from score in scores where score >= 90 select score).Average();

We will select students who score 90 or above. Imagine, those are the semester...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Beginning C# 7 Hands-On ??? Advanced Language Features
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon