Upper/lower Case in C#

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

I have the following in vb.net:

DataSetObj.Tables(0).Rows(i).ItemArray(1) =
UCase(DataSetObj.Tables(0).Rows(i).ItemArray(1))

I tried this is C#, but got the error that UCase and LCase don't exist.

DataSetObj.Tables[0].Rows.ItemArray[1] =
UCase(DataSetObj.Tables[0].Rows.ItemArray[1]);

How would I do this in C#?

Thanks,

Tom
 
Hi,

Why are you using ItemArray ? You could just use Rows[1]

What type is the column?

You could do:
DataSetObj.Tables[0].Rows[1].ToString().ToUpper();

If the column is a string you could just cast it instead of calling
ToString()

cheers,
 

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

Similar Threads


Back
Top