当前位置: 首页>>代码示例>>VB.NET>>正文


VB.NET DbConnectionStringBuilder.EquivalentTo方法代码示例

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


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

示例1: Main

Sub Main()
    Dim builder1 As New DbConnectionStringBuilder
    builder1.ConnectionString = _
        "Value1=SomeValue;Value2=20;Value3=30;Value4=40"
    Console.WriteLine("builder1 = " & builder1.ConnectionString)

    Dim builder2 As New DbConnectionStringBuilder
    builder2.ConnectionString = _
        "value2=20;value3=30;VALUE4=40;Value1=SomeValue"
    Console.WriteLine("builder2 = " & builder2.ConnectionString)

    Dim builder3 As New DbConnectionStringBuilder
    builder3.ConnectionString = _
        "value2=20;value3=30;VALUE4=40;Value1=SOMEVALUE"
    Console.WriteLine("builder3 = " & builder3.ConnectionString)

    ' builder1 and builder2 contain the same
    ' keys and values, in different order, and the 
    ' keys are not consistently cased. They are equivalent.
    Console.WriteLine("builder1.EquivalentTo(builder2) = " & _
        builder1.EquivalentTo(builder2).ToString())

    ' builder2 and builder3 contain the same key/value pairs in the 
    ' the same order, but the value casing is different, so they're
    ' not equivalent.
    Console.WriteLine("builder2.EquivalentTo(builder3) = " & _
        builder2.EquivalentTo(builder3).ToString())

    Console.WriteLine("Press Enter to continue.")
    Console.ReadLine()
End Sub
开发者ID:VB.NET开发者,项目名称:System.Data.Common,代码行数:31,代码来源:DbConnectionStringBuilder.EquivalentTo


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