public int GetArrayRank () { GetInfo (); if (info.rank == 0) throw new ArgumentException ("Type must be an array type."); return info.rank; }