本文整理匯總了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