SqlClientFactory.CreateConnectionStringBuilder 方法

定义

返回强类型的 DbConnectionStringBuilder 实例。

public:
 override System::Data::Common::DbConnectionStringBuilder ^ CreateConnectionStringBuilder();
public override System.Data.Common.DbConnectionStringBuilder CreateConnectionStringBuilder ();
override this.CreateConnectionStringBuilder : unit -> System.Data.Common.DbConnectionStringBuilder
Public Overrides Function CreateConnectionStringBuilder () As DbConnectionStringBuilder

返回

DbConnectionStringBuilder 的新强类型实例。

示例

以下代码片段返回强类型 DbConnectionStringBuilder 实例:

Dim newFactory As SqlClientFactory = SqlClientFactory.Instance
Dim cmd As DbConnectionStringBuilder = _
    newFactory.CreateConnectionStringBuilder()
SqlClientFactory newFactory = SqlClientFactory.Instance;
DbConnectionStringBuilder cmd =
    newFactory.CreateConnectionStringBuilder();

适用于

另请参阅