本文整理汇总了VB.NET中System.Tuple<T1>.Item1属性的典型用法代码示例。如果您正苦于以下问题:VB.NET Tuple<T1>.Item1属性的具体用法?VB.NET Tuple<T1>.Item1怎么用?VB.NET Tuple<T1>.Item1使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。
在下文中一共展示了Tuple<T1>.Item1属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: modMain
' 导入命名空间
Imports System.Numerics
Module modMain
Public Sub Main()
Dim tuple1 = Tuple.Create(-1.23445e-32)
' Display information about this singleton.
Dim tuple1Type As Type = tuple1.GetType()
Console.WriteLine("First 1-Tuple:")
Console.WriteLine(" Type: {0}", tuple1Type.Name)
Console.WriteLine(" Generic Parameter Type: {0}",
tuple1Type.GetGenericArguments()(0))
Console.WriteLine(" Component Value: {0}", tuple1.Item1)
Console.WriteLine(" Component Value Type: {0}",
tuple1.Item1.GetType().Name)
Console.WriteLine()
Dim tuple2 As New Tuple(Of BigInteger)(1.83789322281780983781356676e103)
' Display information about this singleton.
Dim tuple2Type As Type = tuple2.GetType()
Console.WriteLine("Second 1-Tuple:")
Console.WriteLine(" Type: {0}", tuple2Type.Name)
Console.WriteLine(" Generic Parameter Type: {0}",
tuple2Type.GetGenericArguments()(0))
Console.WriteLine(" Component Value: {0}", tuple2.Item1)
Console.WriteLine(" Component Value Type: {0}",
tuple2.Item1.GetType().Name)
End Sub
End Module
输出:
First 1-Tuple: Type: Tuple`1 Generic Parameter Type: System.Double Component Value: -1.23445E-32 Component Value Type: Double Second 1-Tuple: Type: Tuple`1 Generic Parameter Type: System.Numerics.BigInteger Component Value: 1.8378932228178098168858909492E+103 Component Value Type: BigInteger