Rant about EnvDTE.CodeTypeRef.Rank

August 4, 2008

When you have a variable (EnvDTE.CodeVariable) or function (EnvDTE.CodeFunction), their Type property returns an EnvDTE.CodeTypeRef with information about the type. If the type is an array then CodeTypeRef.Rank returns the dimensions (1, 2…). The problem is that if it is not an array, it throwns an exception, which can hurt the performance if you do […]