# Working with User Input

Use what a user types in a query safely with SqlCommand parameters, and see why building SQL from their text opens the door to SQL injection.

![Cheat sheet: Working with User Input](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/fdfbfabbf84642a7bfd33490ccfed32a.webp)

- Category: C#
- Level: Journeyman
- Tags: c-sharp, Null-Coalescing Operator, Parameterized Query, SQL Injection, t-sql
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/working-with-user-input-in-csharp-cheat-sheet
