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

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.

主站蜘蛛池模板: 铜鼓县| 祁门县| 巴林右旗| 雅安市| 吴堡县| 香港 | 正安县| 泗洪县| 文登市| 白银市| 海晏县| 肥城市| 鲁甸县| 东安县| 呼玛县| 江城| 和林格尔县| 农安县| 武宁县| 睢宁县| 麟游县| 南召县| 莎车县| 乐平市| 普兰县| 简阳市| 佳木斯市| 怀柔区| 宜阳县| 白银市| 义乌市| 鄂州市| 高阳县| 江西省| 长沙市| 河池市| 成都市| 甘洛县| 错那县| 喀什市| 河北省|