I'm writing an automated SQLCLR deployment tool and I'm using reflection to discover the procedures and functions that have to be declared. So I'm using code like this to build the T-SQL needed to deploy the assembly methods:
...
if (p.ParameterType == typeof(string))
{
sql = "nvarchar(4000)";
}
...
But this method contains an parameter declared in C# as out SqlBytes bytes and the ParameterType is SqlBytes&. I cannot use typeof(SqlBytes&) for comparison, because is invalid syntax. So I'm a bit puzzled what exactly is the SqlBytes& type, and if there is a way to produce the typeof for it. I know I can resort to types name (ie. strings) comparison instead, that is not my the question, I'm more curious what is such a type with &, seems like a C++ reference type, but I reckon in +10 years of working with .Net I've never noticed them.
