• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Tuple
 

Tuple

on

  • 229 views

 

Statistics

Views

Total Views
229
Views on SlideShare
229
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 表示一組資料,如資料庫記錄從method回傳多個值,不需使用out參數使用一個參數傳遞多個值到method

Tuple Tuple Presentation Transcript

  • TUPLE 2013/08/16 Howard
  • 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.
  • TUPLE  Provides static methods for creating tuple objects.
  • TUPLE EXAMPLE 
  • 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.
  • 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.
  • TUPLE<T1, T2, T3, T4, T5, T6, T7, TREST> 
  • REFERENCES  http://msdn.microsoft.com/en-us/library/system.tuple.aspx  http://msdn.microsoft.com/en-us/library/dd383325.aspx