Freigeben über


SqlClientFactory.CreateCommand Methode

Definition

Gibt eine stark typisierte DbCommand-Instanz zurück.

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

Gibt zurück

Eine neue stark typisierte Instanz von DbCommand .

Beispiele

Das folgende Codefragment gibt eine stark typisierte DbCommand Instanz zurück:

SqlClientFactory newFactory = SqlClientFactory.Instance;
DbCommand cmd = newFactory.CreateCommand();

Gilt für: