• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

VB.NET Tuple.Create方法代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了VB.NET中System.Tuple.Create方法的典型用法代码示例。如果您正苦于以下问题:VB.NET Tuple.Create方法的具体用法?VB.NET Tuple.Create怎么用?VB.NET Tuple.Create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Tuple的用法示例。



在下文中一共展示了Tuple.Create方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的VB.NET代码示例。

示例1:

Dim primes = Tuple.Create(2, 3, 5, 7, 11, 13, 17, 19)
Console.WriteLine("Prime numbers less than 20: " + 
                  "{0}, {1}, {2}, {3}, {4}, {5}, {6}, and {7}",
                  primes.Item1, primes.Item2, primes.Item3, 
                  primes.Item4, primes.Item5, primes.Item6,
                  primes.Item7, primes.Rest.Item1)
开发者ID:VB.NET开发者,项目名称:System,代码行数:6,代码来源:Tuple.Create

输出:

Prime numbers less than 20: 2, 3, 5, 7, 11, 13, 17, and 19


示例2: Tuple

Dim primes As New Tuple(Of Integer, Integer, Integer, Integer, 
                           Integer, Integer, Integer, 
                           Tuple(Of Integer)) _
                       (2, 3, 5, 7, 11, 13, 17, 
                        New Tuple(Of Integer)(19))
开发者ID:VB.NET开发者,项目名称:System,代码行数:5,代码来源:Tuple.Create


示例3:

Dim tuple7 = Tuple.Create("Jane", 90, 87, 93, 67, 100, 92)
Console.WriteLine("Test scores for {0}: {1}, {2}, {3}, {4}, {5}, {6}",
                  tuple7.Item1, tuple7.Item2, tuple7.Item3,
                  tuple7.Item4, tuple7.Item5, tuple7.Item6,
                  tuple7.Item7)
' Displays Test scores for Jane: 90, 87, 93, 67, 100, 92
开发者ID:VB.NET开发者,项目名称:System,代码行数:6,代码来源:Tuple.Create


示例4: Tuple

Dim tuple7 = New Tuple(Of String, Integer, Integer, 
                       Integer, Integer, Integer, Integer) _
                       ("Jane", 90, 87, 93, 67, 100, 92)
Console.WriteLine("Test scores for {0}: {1}, {2}, {3}, {4}, {5}, {6}",
                  tuple7.Item1, tuple7.Item2, tuple7.Item3,
                  tuple7.Item4, tuple7.Item5, tuple7.Item6,
                  tuple7.Item7)
' Displays Test scores for Jane: 90, 87, 93, 67, 100, 92
开发者ID:VB.NET开发者,项目名称:System,代码行数:8,代码来源:Tuple.Create


示例5:

Dim tuple6 = Tuple.Create("Jane", 90, 87, 93, 67, 100)
Console.WriteLine("Test scores for {0}: {1}, {2}, {3}, {4}, {5}",
                  tuple6.Item1, tuple6.Item2, tuple6.Item3,
                  tuple6.Item4, tuple6.Item5, tuple6.Item6)
' Displays Test scores for Jane: 90, 87, 93, 67, 100
开发者ID:VB.NET开发者,项目名称:System,代码行数:5,代码来源:Tuple.Create


示例6: Tuple

Dim tuple6 = New Tuple(Of String, Integer, Integer, Integer, 
                       Integer, Integer) _
                       ("Jane", 90, 87, 93, 67, 100)
Console.WriteLine("Test scores for {0}: {1}, {2}, {3}, {4}, {5}",
                  tuple6.Item1, tuple6.Item2, tuple6.Item3,
                  tuple6.Item4, tuple6.Item5, tuple6.Item6)
' Displays Test scores for Jane: 90, 87, 93, 67, 100
开发者ID:VB.NET开发者,项目名称:System,代码行数:7,代码来源:Tuple.Create


示例7:

Dim tuple5 = Tuple.Create("New York", 1990, 7322564, 2000, 
                          8008278)
Console.WriteLine("{0}: {1:N0} in {2}, {3:N0} in {4}",
                  tuple5.Item1, tuple5.Item3, tuple5.Item2,
                  tuple5.Item5, tuple5.Item4)
' Displays New York: 7,322,564 in 1990, 8,008,278 in 2000
开发者ID:VB.NET开发者,项目名称:System,代码行数:6,代码来源:Tuple.Create


示例8: Tuple

Dim tuple5 = New Tuple(Of String, Integer, Integer, 
                       Integer, Integer) _
                       ("New York", 1990, 7322564, 2000, 8008278)
Console.WriteLine("{0}: {1:N0} in {2}, {3:N0} in {4}",
                  tuple5.Item1, tuple5.Item3, tuple5.Item2,
                  tuple5.Item5, tuple5.Item4)
' Displays New York: 7,322,564 in 1990, 8,008,278 in 2000
开发者ID:VB.NET开发者,项目名称:System,代码行数:7,代码来源:Tuple.Create


示例9:

Dim tuple4 = Tuple.Create("New York", 32.68, 51.87, 76.3)
Console.WriteLine("{0}: Hi {1}, Lo {2}, Ave {3}",
                  tuple4.Item1, tuple4.Item4, tuple4.Item2,
                  tuple4.Item3)
' Displays New York: Hi 76.3, Lo 32.68, Ave 51.87
开发者ID:VB.NET开发者,项目名称:System,代码行数:5,代码来源:Tuple.Create


示例10: Tuple

Dim tuple4 = New Tuple(Of String, Double, Double, Double) _
                      ("New York", 32.68, 51.87, 76.3)
Console.WriteLine("{0}: Hi {1}, Lo {2}, Ave {3}",
                  tuple4.Item1, tuple4.Item4, tuple4.Item2,
                  tuple4.Item3)
' Displays New York: Hi 76.3, Lo 32.68, Ave 51.87
开发者ID:VB.NET开发者,项目名称:System,代码行数:6,代码来源:Tuple.Create


示例11:

Dim tuple3 = Tuple.Create("New York", 32.68, 51.87)
Console.WriteLine("{0}: lo {1}, hi {2}", 
                  tuple3.Item1, tuple3.Item2, tuple3.Item3)
' Displays New York: lo 32.68, hi 51.87
开发者ID:VB.NET开发者,项目名称:System,代码行数:4,代码来源:Tuple.Create


示例12: Tuple

Dim tuple3 = New Tuple(Of String, Double, Double)("New York", 32.68, 51.87)
Console.WriteLine("{0}: lo {1}, hi {2}", 
                  tuple3.Item1, tuple3.Item2, tuple3.Item3)
' Displays New York: lo 32.68, hi 51.87
开发者ID:VB.NET开发者,项目名称:System,代码行数:4,代码来源:Tuple.Create


示例13:

Dim tuple2 = Tuple.Create("New York", 32.68)
Console.WriteLine("{0}: {1}", tuple2.Item1, tuple2.Item2)
' Displays New York: 32.68
开发者ID:VB.NET开发者,项目名称:System,代码行数:3,代码来源:Tuple.Create


示例14: Tuple

Dim tuple2 = New Tuple(Of String, Double)("New York", 32.68)
Console.WriteLine("{0}: {1}", tuple2.Item1, tuple2.Item2)
' Displays New York: 32.68
开发者ID:VB.NET开发者,项目名称:System,代码行数:3,代码来源:Tuple.Create



注:本文中的System.Tuple.Create方法示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
VB.NET Type.GetType方法代码示例发布时间:2022-05-24
下一篇:
VB.NET TimeSpan.Add方法代码示例发布时间:2022-05-24
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap