Skip to Content
.NET Standard 2.0 Cookbook
book

.NET Standard 2.0 Cookbook

by Fiqri Ismail
May 2018
Intermediate to advanced content levelIntermediate to advanced
394 pages
9h 51m
English
Packt Publishing
Content preview from .NET Standard 2.0 Cookbook

How it works...

We created a blank solution in steps 1 to 5. In steps 7 to 10, we added a .NET Standard 2.0 Class Library project to the solution. We have given a meaningful name to the project in these steps. We renamed the default class name generated from the template in steps 12 and 13. We added a using statement for LINQ in step 14. This is necessary to explain the lambda expressions using LINQ.

In step 16, we added code to create a delegate and a method to use that delegate as a parameter. The delegate Message takes a parameter as a string and returns the output as a string. Then, we added a method to add two numbers and return the answer as a string with a message. As you can see, there are three parameters for the AddTwoNumbers() ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# 7 and .NET Core 2.0 High Performance

C# 7 and .NET Core 2.0 High Performance

Ovais Mehboob Ahmed Khan
.NET Core 2.0 By Example

.NET Core 2.0 By Example

Neha Shrivastava, Rishabh Verma

Publisher Resources

ISBN: 9781788834667Supplemental Content