I have a lot of C# VS2008 code that looks like this:
new SqlParameter("@Description", SqlDbType.NChar, 1500)
or this:
new SqlParameter("@IsRequired", SqlDbType.Bit)
I want to change this code throughout my project — there are thousands of occurrences of this pattern.
How can I write a regular expression to remove the new SqlParameter()
portion and just leave:
"@Description", SqlDbType.NChar, 1500
and
"@IsRequired", SqlDbType.Bit
?