c# - traverse through n - dimensional Jagged Array
<p>I am trying to be able to run through a jagged array but the array depth is not constant. i am looking for a clean way to go through each object in the array. right now i have a simple switch case that can handle the different levels by getting its Rank as an int for the case. </p>

<p>but some time the array is 2 levels deep and sometimes it 5 levels deep. i would like to not have to write a case for each depth level. </p>

<p>for example, i have a object names myObj, some times it is myObj[] or myObj[][] or myObj[][][][];</p>

<p>using either foreach or Ienumerator only traverse the first dimension of the array  </p>
