官术网_书友最值得收藏!

Getting ready

Start off by creating a regular console application in Visual Studio 2017. Simply call the project you create cookbook. Before I can jump into using Tuples in C# 7.0, I need to add in a NuGet package. Bear in mind that I am using the release candidate of Visual Studio. This process might change between now and the final release of the product.

  1. To do this, head on over to Tools, NuGet Package Manager and then, click on Manage NuGet Packages for Solution....
  1. Select the Browse tab and type in ValueTuple in the search box. The System.ValueTuple by Microsoft NuGet package should be displayed. Select the cookbook project under Manage Packages for Solution and click on the Install button.

Take note that I am using Visual Studio 2017 RC while writing portions of this book. You probably will not need to add System.ValueTuple from NuGet some time in the future after the final release. Adding System.ValueTuple from NuGet might, however, remain a requirement. Only time will tell.

  1. Visual Studio will now show you a prompt to review the changes you are about to make to your project. Just click on the OK button. Lastly, you will need to provide the License Agreement required by Microsoft. Just click on the I Accept button. Visual Studio will now start the NuGet package installation. It will show you its progress in the Output window.

After all this is complete, my Visual Studio solution looks as follows:

You will now be ready to create your first method that works with Tuples. Let's see how to do that next.

主站蜘蛛池模板: 贺州市| 抚顺市| 天峨县| 年辖:市辖区| 南皮县| 石楼县| 嘉黎县| 钟山县| 黄陵县| 巩义市| 互助| 三明市| 同仁县| 沅江市| 仲巴县| 门源| 英吉沙县| 大埔区| 凉山| 平顺县| 诸城市| 吴川市| 株洲市| 北海市| 宁远县| 静乐县| 宁夏| 肃北| 峡江县| 南昌县| 塘沽区| 道真| 四川省| 连州市| 准格尔旗| 清河县| 广汉市| 高阳县| 喀喇沁旗| 凤凰县| 盱眙县|