How it works...

In steps 1 to 4, we opened the solution we created in the previous recipe. In steps 6 to 12, we added a .NET Standard 2.0 library to the solution. Now, the solution has two projects, an iOS project and a .NET Standard 2.0 library project. In steps 14 to 16, we renamed the class created by Visual Studio. We also renamed the actual class name to match the file name.

In step 17, we added a public method that takes a string parameter and returns a string as a welcome message. Finally, we performed a quick build to check for the correct syntax.

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.