本文整理汇总了VB.NET中System.Tuple<T1,T2,T3,T4>.Item4属性的典型用法代码示例。如果您正苦于以下问题:VB.NET Tuple<T1,T2,T3,T4>.Item4属性的具体用法?VB.NET Tuple<T1,T2,T3,T4>.Item4怎么用?VB.NET Tuple<T1,T2,T3,T4>.Item4使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Tuple<T1,T2,T3,T4>
的用法示例。
在下文中一共展示了Tuple<T1,T2,T3,T4>.Item4属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Example
' 导入命名空间
Imports System.Globalization
Module Example
Public Sub Main()
Dim temperatures() =
{ Tuple.Create("New York, NY", 4, 61, 43), _
Tuple.Create("Chicago, IL", 2, 34, 18), _
Tuple.Create("Newark, NJ", 4, 61, 43), _
Tuple.Create("Boston, MA", 6, 77, 59), _
Tuple.Create("Detroit, MI", 9, 74, 53), _
Tuple.Create("Minneapolis, MN", 8, 81, 61) }
' Display the array of 4-tuples.
Console.WriteLine("{0,41}", "Temperatures")
Console.WriteLine("{0,-20} {1,5} {2,4} {3,4}",
"City", "Month", "High", "Low")
Console.WriteLine()
For Each temperature In temperatures
Console.WriteLine("{0,-20} {1,5} {2,4:N1} {3,4:N1}",
temperature.Item1,
DateTimeFormatInfo.CurrentInfo.GetAbbreviatedMonthName(temperature.Item2 - 1),
temperature.Item3, temperature.Item4)
Next
End Sub
End Module
输出:
Temperatures City Month High Low New York, NY Mar 61.0 43.0 Chicago, IL Jan 34.0 18.0 Newark, NJ Mar 61.0 43.0 Boston, MA May 77.0 59.0 Detroit, MI Aug 74.0 53.0 Minneapolis, MN Jul 81.0 61.0