How it works...

We have created a blank solution in steps 1 to 5 and assigned it a proper name. In steps 6 to 10, we added a new project to the solution. We selected a .NET Standard 2.0 library template as the starting point of the project and then we gave it a proper name. In steps 11 and 12, we renamed the default Class1.cs to something more meaningful. This class was generated from the template itself. You can rename it or you can delete that file and add a new one.

In step 15, we created a method that returns two string types and an integer type. This was possible because of tuples. In that method, we assigned the variables and returned them in a sequence to match the return type of the method. Finally, we performed a quick build to confirm ...

Get .NET Standard 2.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.