Uwak Peter

Uwak Peter

  • 1.6k
  • 96
  • 6.8k

How to use split function with data reader

Jun 20 2014 11:25 AM
I have  retrieving record from a field in the database, the format of the record is: Attr_8964_1, the first two parts remain the same, but the last part is auto incremented, how can i split to get the last part while retrieving with data?

i tried using list, but didnt know how, below is my code:

listAttributeRegion.Add(reader["RegionName"].ToString().Split("_"));

but it is not working, any assistance will be apprciated.

Thanks in advance

Answers (1)