i want to retrive min and max value from dataset and those values use in for loop for display title in panel
String sql = \"select title, song_id from up_so
With using Linq extension methods:
Linq
int minSongId = ds.Tables["title"].AsEnumerable() .Min(r => r.Field("song_id")); int maxSongId = ds.Tables["title"].AsEnumerable() .Max(r => r.Field("song_id"));