David Smith

David Smith

  • NA
  • 2k
  • 0

Double [] test

Jan 22 2012 11:46 PM
I am struggling, I am trying to pass in double [] array and added to my ArrayDictionary , can someone assist me.

 enum ArrayType
{
  Array1,
  Array2,
  Array3

}


  public Dictionary<string, List<double []>> ArrayDictionary { get; set; }

  public void ConstructArray(double[] array1, double[] array2, double[] array3)
  {
  foreach (ArrayType arrayItem in Enum.GetValues(typeof(ArrayType)))
  {
  ArrayDictionary.Add(arrayItem .ToString(), new List<double[]>());

  switch (opticalArrayItem)
  {
  case ArrayType.Array1:

  foreach (double arrayItem in array1)
  {
  // Add to ArrayDictionary
 
  }
  break;

  case ArrayType.Array2:
    foreach (double arrayItem in array1)
  {
  // Add to ArrayDictionary b
 
  }
  break;

  case ArrayType.Array3:
    foreach (double arrayItem in array1)
  {
  // Add to ArrayDictionary
 
  }

  break;
  }
  }
  }

Answers (21)