Tuple(Of T1, T2, T3, T4, T5, T6, T7).Item6 Property

Gets the value of the current Tuple(Of T1, T2, T3, T4, T5, T6, T7) object's sixth component.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public ReadOnly Property Item6 As T6

Property Value

Type: T6
The value of the current Tuple(Of T1, T2, T3, T4, T5, T6, T7) object's sixth component.

You can dynamically determine the type of the Item6 component in one of two ways:

The following example defines an array of Tuple(Of T1, T2, T3, T4, T5, T6, T7) objects whose components contain population data for three U.S. cities (New York, Chicago, and Los Angeles) from 1950 through 2000. It then displays a table that lists the data. To display the population in 1990, it retrieves the value of the Item6 property for each Tuple(Of T1, T2, T3, T4, T5, T6, T7) object.


Imports System.Windows.Media

Module Example
   Public Sub Demo(ByVal outputBlock As System.Windows.Controls.TextBlock)
      outputBlock.FontFamily = new FontFamily("Courier New")
      ' Create tuples containing population data for New York, Chicago, 
      ' and Los Angeles, 1960-2000.
      Dim cities() = _
           { Tuple.Create("New York", 7891957, 7781984, 7894862, _ 
                          7071639, 7322564, 8008278), _
             Tuple.Create("Los Angeles", 1970358, 2479015, 2816061, _ 
                          2966850, 3485398, 3694820), _
             Tuple.Create("Chicago", 3620962, 3550904, 3366957, _ 
                          3005072, 2783726, 2896016) } 

      ' Display tuple data in table.
      Dim header As String = "Population in"
      outputBlock.Text += String.Format("{0,-12} {1,66}", _  
                        "City", New String("-"c,(66-header.Length)\2) + header + _
                                New String("-"c, (66-header.Length)\2)) & vbCrLf
      outputBlock.Text += String.Format("{0,24}{1,11}{2,11}{3,11}{4,11}{5,11}", _ 
                        "1950", "1960", "1970", "1980", "1990", "2000") & vbCrLf                  
      outputBlock.Text &= vbCrLf
      For Each city In cities
         outputBlock.Text += String.Format("{0,-12} {1,11:N0}{2,11:N0}{3,11:N0}{4,11:N0}{5,11:N0}{6,11:N0}", _
                           city.Item1, city.Item2, city.Item3, city.Item4, _
                           city.Item5, city.Item6, city.Item7) + vbCrLf
      Next
   End Sub
End Module
' The example displays the following output:
'    City          --------------------------Population in--------------------------
'                        1950       1960       1970       1980       1990       2000
'    
'    New York       7,891,957  7,781,984  7,894,862  7,071,639  7,322,564  8,008,278
'    Los Angeles    1,970,358  2,479,015  2,816,061  2,966,850  3,485,398  3,694,820
'    Chicago        3,620,962  3,550,904  3,366,957  3,005,072  2,783,726  2,896,016


Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: