Given a ParameterInfo p from this:
void foo(int modopt(IsLong) n);
p.GetOptionalCustomModifiers() returns a System.Runtime.CompilerServices.IsLong; however, if the method signature happens to be:
void foo(out int modopt(IsLong) n);
It does not. Is there a work around for this?
Per: https://connect.microsoft.com/VisualStudio/feedback/details/503412/custom-type-modifiers-modreq-modopt-are-generally-inaccessible-through-the-current-reflection-api
It seems that this is already well known and Microsoft does not plan on fixing it in .NET 4.0