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
Loading
VulpesPosted Jun 20, 2014, 11:49 AM
string lastPart = reader["RegionName"].ToString().Split('_')[2];