TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Phung
NA
5
9.2k
Unable to cast object of type 'System.Single[*]' to type 'System.Single[]'
Apr 9 2011 9:44 AM
Hi,
Would you please help? I have been struggling for two weeks without any success. I try to convert System._COMObject Type to Array type. It worked in VS2008 however when I change to VS2010 it doesn't.
int[] myLengthsArray = new int[1] { nMem };
int[] myBoundsArray = new int[1] { 1 };
myDs = Array.CreateInstance(typeof(double), myLengthsArray, myBoundsArray);//Depth D
Array myDs;
private void PopulateArrays(Multiframe.SectionList mySectionList)
{
myDs = (Array)mySectionList.D;
}
I also try Array.ConvertAll but that didn't work either
myDs = Array.ConvertAll<object, double>(testdata, new Converter<object, double>(ConvertIntToString));
private double ConvertIntToString(object iData)
{
double cData = Convert.ToDouble(iData);
return cData;
}
Thanks
Rob
Reply
Answers (
10
)
Routing