public int GetLogicalTypeDepth(IType type) { int depth = type.GetTypeDepth(); if (type.IsValueType) return depth - 1; return depth; }