title: Reading and Operating on a HDF5 File
body: <p>I found a similar question at <a href="https://stackoverflow.com/questions/7939723/c-sharp-hdf5-example-code">HDF5 Example code</a><br>
  but I'm having trouble viewing the hdf5 dataset contents correctly.  </p>
  
  <p>The dataset I'm looking at contains string headers with strings in the first column and doubles in the others.  </p>
  
  <p>Here's what my code looks like:  </p>
  
  <pre><code>public static void readh5(string path, string filename)
  {
      H5.Open();
      var fileID = H5F.open(path + filename, H5F.OpenMode.ACC_RDONLY);
  
      var groupID = H5G.open(fileID, "/Example Group/");
      var datasetID = H5D.open(groupID, "Events");
      var dataSpace = H5D.getSpace(datasetID);
      var size = H5S.getSimpleExtentDims(dataSpace);
      var dataType = H5D.getType(datasetID);
  
      double[,] dataArray = new double[size[0],11];
      var wrapArray = new H5Array&lt;double&gt;(dataArray);
      H5D.read(datasetID, dataType, wrapArray);
      Console.WriteLine(wrapArray);
  }
  </code></pre>
  
  <p>When I debug and look into wrapArray each element is an incredibly large or small doubles from 10^300 to 10^-300 in value and I don't know why. I don't think those are ID numbers of the elements. I've tried changing the datatype of wrapArray and dataArray to object but that still doesn't give me the exact contents of the dataset. </p>
  
  <p>The output I'm getting for wrapArray looks like:  </p>
  
  <pre><code>[0,0] 4.0633928641260729E+87  
  [0,1] 9.77854726248995E-320  
  [0,2] 1.52021104712121E-312  
  </code></pre>
  
  <p>etc.  </p>
  
  <p>But what I want is:  </p>
  
  <pre><code>[0,0] Event1  
  [0,1] 2  
  [0,2] 56  
  </code></pre>
  
  <p>etc.  </p>
  
  <p>After reading in the dataset I want to loop through the first column to find specific strings, and get the corresponding elements in the other columns. But I have to figure out this out.</p>