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