Upcoming SlideShare
×

# Tuple

235 views

Published on

Published in: Technology
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

Views
Total views
235
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
0
0
Likes
0
Embeds 0
No embeds

No notes for slide
• 表示一組資料，如資料庫記錄從method回傳多個值，不需使用out參數使用一個參數傳遞多個值到method
• ### Tuple

1. 1. TUPLE 2013/08/16 Howard
2. 2. TUPLE  A tuple is a data structure that has a specific number and sequence of elements.  An example of a tuple is a data structure with three elements (known as a 3-tuple or triple) that is used to store an identifier such as a person's name in the first element, a year in the second element, and the person's income for that year in the third element.  The .NET Framework directly supports tuples with one to seven elements.  In addition, you can create tuples of eight or more elements by nesting tuple objects in the Rest property of a Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> object.
3. 3. TUPLE  Provides static methods for creating tuple objects.
4. 4. TUPLE EXAMPLE 
5. 5. TUPLES ARE COMMONLY USED IN FOUR WAYS  To represent a single set of data. For example, a tuple can represent a database record, and its components can represent individual fields of the record.  To provide easy access to, and manipulation of, a data set.  To return multiple values from a method without using out parameters (in C#) or ByRef parameters (in Visual Basic).  To pass multiple values to a method through a single parameter.
6. 6. TUPLE<T1, T2, T3, T4, T5, T6, T7, TREST>  Represents an n-tuple, where n is 8 or greater.  TRest  Any generic Tuple object that defines the types of the tuple's remaining components.
7. 7. TUPLE<T1, T2, T3, T4, T5, T6, T7, TREST> 
8. 8. REFERENCES  http://msdn.microsoft.com/en-us/library/system.tuple.aspx  http://msdn.microsoft.com/en-us/library/dd383325.aspx