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

Adding a new table to the People database

Now, for the next stage, click on View in the menu bar, and select SQL Server Object Explorer. You have to add a new table, so in the People database, right-click on the Tables folder and select Add New Table... . Your screen should look like the one shown in Figure 20.5.1:

Figure 20.5.1: A blank new table

Next, type XValues in the Id field, and then click in the Data Type field. Start to type decimal, and notice that decimal(18,0) shows up automatically. Now change this to (18,3). This simply means a field that is 18 wide and has 3 decimal places; that is, it's a total of 18 wide with 3 to the right and 15 to the left for a total of 18 altogether. The Allow Nulls box should be checked for this field. It's the same thing for YValues. Imagine that we've done an experiment, and we've measured some quantities. So, enter...

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