# CommandType

*noun*

say it: **“kuh-MAND type”** **/kəˈmænd taɪp/**

An ADO.NET command setting that says whether its text is SQL or the name of a stored procedure.

## What is **CommandType** in C#?

**CommandType** — A setting on an ADO.NET command that says what its text is: SQL (the default, `Text`) or the name of a stored procedure (`StoredProcedure`). With `StoredProcedure`, the parameters you add become the procedure's parameters.

```csharp
using SqlCommand command = new("CustOrderHist", connection);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@CustomerID", "ALFKI");
```

## In a sentence

- “I set **CommandType** to StoredProcedure and passed just the procedure's name.”

Level: Journeyman · [More C# terms at this level](https://www.ask-codey.com/glossary?category=c-sharp&level=3)

Updated: October 28, 2026

Source: https://www.ask-codey.com/glossary/commandtype
