Get String from unknown object

  • Thread starter Thread starter Webgour
  • Start date Start date
W

Webgour

Hello,

I'm using the following

System.Collections.IEnumerator IEn =
((System.Collections.IEnumerable)DataSource).GetEnumerator();
while (IEn.MoveNext())
{
dr = m_contentDataTable.NewRow();
dr[0] = IEn.Current;
m_contentDataTable.Rows.Add(dr);
}

However I would like to get the content from the IEnumerator.Current as a
string, however I know what kind of object is assigned as Datasource....
Any ideas.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top