Browse by Tags
All Tags »
LINQ (
RSS)
Sometimes we have to create generic dictionary from the values in datatable. Usually we will loop through all the rows in the datatable and add the relevant keys to dictionary object for ( int _iExRowCnt = 0; _iExRowCnt < dsReturn.Tables[0].Rows.Count;...
Anonymous types are used to define strong types without defining the type. Anonymous types are strongly typed and checked at compile time. It provides a convenient way to encapsulate a set of read-only properties into a single object without having to...
Why do we need LINQ? Most of us would have wrote code to access data from different data sources a database, in memory objects , XML files or from other formats. We have different guidelines, architectures and methods to process and retrieve these data...
Normally to return top N rows we use an SQL statement similar to the one below Select top N * from table but How can we achieve the same thing in DataTable I have seen many examples, using different methods. Most of the methods centered around the idea...
More Posts