Insane, Due to the way string objects are handled in .NET, you've got to do a workaround. There are some examples in the archives, the keyword is Chararray. We use the Chararray class to generate a character array which is what the HDF library ends up using. There were some examples in the .NET docs, but I can't find them after the migration to the hdf5.net domain.
http://mail.hdfgroup.org/pipermail/hdf-forum_hdfgroup.org/2009-June/000216.html http://mail.hdfgroup.org/pipermail/hdf-forum_hdfgroup.org/2009-September/001765.html Scott > -----Original Message----- > From: Hdf-forum [mailto:hdf-forum-boun...@hdfgroup.org] On Behalf Of > Insane > Sent: Tuesday, April 09, 2013 10:16 AM > To: hdf-forum@hdfgroup.org > Subject: [Hdf-forum] c# read different datatypes > > Hi,I have a problem with reading datatypes in HDF5. > If i know that there is <int> > H5D.read(datasetID, dataType, new H5Array<int>(dataint)); it's ok. > But in the dataset there is a table with mixed datatypes. > To grab data i used > struct metadata > { > public string a; > public int b; > public float c; > public float d; > public string f; (and so on) > } > > metadata[] s1 = new metadata[1]; > > H5D.read(datasetID, dataType, new H5Array<metadata_song>(s1)); But > strings are returned as null, float data is not correct as well as > int. > Can u show the point wich i have missed? > > > > > -- > View this message in context: http://hdf-forum.184993.n3.nabble.com/c- > read-different-datatypes-tp4026057.html > Sent from the hdf-forum mailing list archive at Nabble.com. > > _______________________________________________ > Hdf-forum is for HDF software users discussion. > Hdf-forum@hdfgroup.org > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org ________________________________ This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by any virus transmitted by this e-mail. _______________________________________________ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org