- C# 7 and .NET Core Cookbook
- Dirk Strauss
- 118字
- 2021-07-03 00:11:50
Working with Tuples - getting started
I have come across many instances where I wanted to return more than one value from a method. As Mads Torgersen pointed out, the existing options available to developers are not optimal. C# 7.0 has, therefore, introduced Tuple types and Tuple literals to allow developers an easy way of returning multiple values from methods. Developers can also rest easy when creating Tuples. Tuples are structs, which are value types. This means that they are created locally and are passed by copying the contents. Tuples are also mutable and Tuple elements are public mutable fields. I am personally very excited about using Tuples. Let's explore Tuples in closer detail in the following recipe.
推薦閱讀
- Git Version Control Cookbook
- Learning RabbitMQ
- Java性能權威指南(第2版)
- STM32F0實戰:基于HAL庫開發
- Learning Python by Building Games
- 愛上micro:bit
- C/C++數據結構與算法速學速用大辭典
- HTML+CSS+JavaScript網頁設計從入門到精通 (清華社"視頻大講堂"大系·網絡開發視頻大講堂)
- 小程序從0到1:微信全棧工程師一本通
- Docker:容器與容器云(第2版)
- Groovy 2 Cookbook
- Python計算機視覺與深度學習實戰
- VMware vSphere 5.5 Cookbook
- Java EE實用教程
- Joomla!Search Engine Optimization