foreach in List<object> in c# -
[]
i have list<object> 26 rows. wanted write foreach fetch values. tried diff ways that. no luck. please me. please check attached images
unfortunately, i'm not sure you're asking here sample code started. create list filled string value each object in list.
list<string> stringlist = new list<string>(); foreach(object o in objectlist) { string s; s= o.tostring(); stringlist.add(s); }
as it's been mentioned, take @ loops , conditional statements learn more them/how use them.
hope helps.
Comments
Post a Comment