If you've been playing building serious applications with SQL Server and its CLR integrtation you may have come across error 6551 or 6552. These relate to types not matching up between the function/type/procedure... declaration in TSQL to that in your CLR code.
The basics are that certain TSQL types map to certain SQLCLR types.
What can get annoying (if you didn't read the manual like me!) is that you may create your CLR code and TSQL code and can't for love nor money find whats wrong. You've got 1 parameter that is a CLR SqlString and your TSQL is declared as a varchar. Surely they are the same.
Well they could be but they're not. SQLCLR requires the use of the unicode data types nchar and nvarchar.
For a mapping of the types look for "SQL Server Data Types and Their .NET Framework Equivalents" in BOL
So if you're getting error 6551 or 6552 check to see if you have your chars declared properly as nvarchar or nchar.