Is there a way to convert between a Ref parameter type and the non-ref version in C# -


I'm looking at the parameters of a method and removing the types. I return (for example) "System.String & amp;", because the parameter is an outside parameter, I want to know that the parameter is string - but string & amp; There is not a way to make conversions.

Thank you!

The array or an indicator, or the context is not passed, or represents a type parameter in a general type or definition of the common type.

Example:

  var stringRefType = typeof (string) .MakeByRefType (); Var stringType = stringRefType.GetElementType (); Console.light line (string type == typef (string)); // True  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -