I learned something interesting about SQL parameters today. In my C# code I was passing a comma separated string as a parameter to a stored procedure using SqlParameter, but it was allowing ' through unchecked causing havoc in the stored procedure. It turns out when you use dynamic SQL in the stored procedure you lose the safety of the parameter.
Pseudocode Example:
CREATE
@Names
AS
BEGIN
END
When a name was passed with ' in it, the query generation fails. I have to explicity replace the ' with '' in the C#.