title: Casting an array of integers to an array of enums
body: <p>I have an enum that has 4 values: </p>
  
  <pre><code>public enum DriveRates 
  { 
      driveSidereal = 0,
      driveLunar = 1, 
      driveSolar = 2, 
      driveKing = 3 
  } 
  </code></pre>
  
  <p>I have an array of values that I want to cast to an array of DriveRates. However when I do <code>var rates = (DriveRates[])ret;</code>, with <code>ret</code> being an object array of numbers (probably integers), it says <code>Unable to cast object of type 'System.Object[]' to type 'ASCOM.DeviceInterface.DriveRates[]'.</code> </p>
  
  <p><code>ret</code>=<code>{0,1,2,3}</code>. How should I do this instead. Again, I am trying to convert an array of enum values to an array of enum...well, values :) But I'm trying to convert from type <code>object[]</code> to type <code>DriveRates[]</code>.</p>