LINQ

Get LINQ Examples from here.

Wednesday, 26 March 2014

.Net Tips : Fill DataTable from another DataTable using LINQ with C#.Net and VB.Net example

It is very easy to fill DataTable from another DataTable using LINQ after applying LINQ operation. Read More...

Tuesday, 4 March 2014

.Net Tips : Create XML file from another XML file with selected Elements using LINQ with C#.Net and VB.Net example

It is easy to create XML file from another file with selected elements from source XML file using LINQ. Read More...

Friday, 20 December 2013

C# Tips : Validate or Verify XML File Data using LINQ and REGEX with C#.Net and VB.Net example

There is a very easy way to validate XML file Data using LINQ and display result. Here is example for this. Read More...

Wednesday, 20 November 2013

C# Tips : Sort or order by Date in XML File data using LINQ with C#.Net and VB.Net example

We can sort data of XML file base on Elements that contains different type of data like date, etc. Here is example for this. Read More...

Wednesday, 16 October 2013

C# Tips : LINQ SelectMany Method C#.Net and VB.Net example

Here is very useful way to implement SelectMany LINQ method in code. Read More...

Thursday, 26 September 2013

C# Tips : Get Full Path of XML Node using LINQ with C#.Net and VB.Net example

We can get full or whole path of given XML Node or Element using LINQ Read More...

Monday, 26 August 2013


Monday, 15 July 2013

Get all attributes and it's value from XML file using LINQ with C#.Net Example and VB.Net Example

We can get specific attributes and it's values from XML file or document or object using LINQ very easily. Read More...

Friday, 31 May 2013

.Net Tips : LINQ SkipWhile Method Example With C#.Net and VB.Net

SkipWhile LINQ method to return the elements of the array starting from our given condition matched. Read More...

Thursday, 23 May 2013

.Net Tips : LINQ TakeWhile Method Example With C#.Net and VB.Net

You can get element from array until your given condition is satisfied using TakeWhile LINQ method. Read More...

Wednesday, 22 May 2013

.Net Tips : Check sequence of elements in two arrays are equal or not using LINQ With C#.Net and VB.Net Example

You can check that two array has the same sequence of element or not. We are using "SequenceEqual" LINQ method. Read More...

Tuesday, 14 May 2013

.Net Tips: Check that particular word or string part contains in string array using LINQ "Any" method With C#.Net and VB.Net Examples

We can check that particular word or string part contains in string array without iteration using LINQ "Any" method. Read More...

Wednesday, 8 May 2013

.Net Tips: Convert two dimensional array in to Dictionary object using LINQ With C#.Net and VB.Net Examples

You can convert array in to dictionary object using "ToDictionary" LINQ method. Here is example for this. Read More...

Thursday, 2 May 2013

Get only specific type of value from array which contains many types of values from object array using LINQ With C#.Net and VB.Net Examples

We can get specific type of Objects from array of object using using LINQ's "OfType" generic method. Here is example for this. Read More...

Saturday, 19 January 2013

New Object Caching Option Introduce in .Net 4.0 with C# Examples and VB.Net Examples

Before .Net 4.0 we are using System.Web.Caching.Cache object. Now in .Net 4.0 introduce same system.web.caching functionality in System.Runtime.Caching.dll everything was rebuilt into the new namespace of System.Runtime.Caching. Here is Example for this. Read More...

Friday, 19 October 2012

Retrieve or Get only integer values from mixed values of string array or generic string List using LINQ with C# Examples and VB.Net Examples

This is a situations where you have an string array which contains some string element or values and some integer values and we want to parse that integer values from that List or array and retrieve only integer values. We can do with the help of LINQ. We can create an extension method of linq and achieve this. This LINQ extension method is very useful. Read More...

Thursday, 13 September 2012

Create Custom LINQ Extension Methods in VB.Net

You can create your own custom LINQ extension method in .Net Application. These extension methods are very handy in software development. Creating a LINQ extension method in VB.Net has Different approach than C#.Net . For that we need to create "Module" and in this Module we create a methods and add this "" attribute to this methods. Read More...

Friday, 7 September 2012

Create Custom LINQ Extension Methods with C# Examples

There is a need to create a custom LINQ extension method in .Net Application. This is a very good .Net Framework feature. These extension methods are very handy in software development. For that we need to create Static Class and Static Methods. Here is example for this. Read More...

Thursday, 6 September 2012

Concatenate or Combine LINQ query Results or DataSources with C# Examples and VB.Net Examples

There is a situations where you want to Concatenate Or Combine one or more data sources using LINQ. With the help of the Concat<> extension method to concatenate or combine multiple sources into a single data source. Here is example of this. Read More...

Tuesday, 4 September 2012

Convert from IEnumerable<> to Dictionary object using LINQ with C# Examples and VB.Net Examples

There is a situations where you need to convert LINQ result or IEnumerable<> object into Dictionary object. This is possible with the help of the LINQ Extension methods. Here is example for this. In this example we convert One LINQ's IEnumerable<> result in to Dictionary object. Read More...

Saturday, 4 August 2012

Union or combine Two LINQ query Results with C# Examples and VB.Net Examples

You can union of two LINQ query or Results. You can also say combine records from two LINQ query or Results. We are using "Union" method of LINQ. In this example we combine or union records from two DataTable using LINQ. Here is example of this. In this example we execute two different LINQ Query on DataTable and find two different results object. After that we combine those records and display. Read More...

Tuesday, 24 July 2012

Intersect or find common records or find duplicate records of Two LINQ queries with C# Examples and VB.Net Examples

You can get Intersect of two LINQ query or Results. Intersect means find common records between two LINQ results. You can also say find duplicate records from two LINQ query or Results. In this example we find duplicate records from two DataTable using LINQ. Here is example of this. Read More...

Wednesday, 11 July 2012

Execute or Perform LINQ query on DataTable Or DataSet

You can execute LINQ query on DataTable Or Specific table on DataSet with the help of the AsEnumerable. Here is example for this. Read More...

Thursday, 5 July 2012

Read and Processing XML file with an Xdocument with C# Examples and VB.Net Examples

XDocument is Introduce in System.Xml.Linq namespace. XDocument is more friendlier and easy to use than XMLDocument. Earlier we are using XMLDocument for read and processing XML File. Syntax of retrieving element from XML document is different than XMLDocument. Every .Net Beginners needs to know this. Read More...

Friday, 15 June 2012

Querying the array using LINQ and Predicate in VB.Net Examples

You can also query the array variables using LINQ. Here are sample example for this. In this example there is an array of integer values which contains various number, Now we want to get numbers in array which is greater then 5. We can do this without FOR loop. There are two possible way to do this. One is using LINQ Query and Second is Using Predicate. Read More...

Tuesday, 12 June 2012

Locate specific lines within the Text file Using LINQ

You can also query the text file using LINQ . Here are example for this. In this example we can get specific lines which has matching word given by us. After the LINQ query is executed you need to close file otherwise it gives error on next attempt to access of file. Read More...

Saturday, 9 June 2012

Get common values from two arrays using LINQ

Using LINQ you are able to fin common values amoung two arrays. There is a one method "Intersect" in LINQ to get intersect values. Here are sample example for this. In this example we have two arrays of integer and find common values of that arrays. Read More...

Thursday, 7 June 2012

Group Join Using LINQ in LINQ To Objects

Using a group join you can get group wise data using LINQ. Here are sample example for this. In this example there are two classes Books and Publishers. Now we want to display Publisher wise books, One publishers has multiple books. We can do this using LINQ. Using a group join you can get all the publishers that match a books as a sequence. Read More...

Wednesday, 6 June 2012

Sort an array using LINQ

Using LINQ you are able to sort array. Array may contains integer , string , double or char values. Here are sample example for this. In this example we have to arrays one is integer and second is string. Read More...

Tuesday, 5 June 2012

Left Outer Join Using LINQ in LINQ To Objects

You can also do left outer join using LINQ. Here are sample example of this. In this example there is book class which has PublisherId field , this fields contains only numeric values. Read More...

Monday, 4 June 2012

Join in XML Data files Using LINQ Query in LINQ to XML

Using LINQ to XML you can also join multiple files and get result based on LINQ query. LINQ to XML uses System.Xml.Linq namespace. Here are example for this. Read More...

Saturday, 2 June 2012

Querying the array using LINQ and LAMBDA Expression

You can also query the array variables using LINQ. Here are sample example for this. In this example there is an array of integer values which contains various number, Now we want to get numbers in array which is greater then 5. We can do this without FOR loop. Read More...

Wednesday, 30 May 2012

Querying the XML data file using LINQ in LINQ to XML

Using LINQ to XML we can use the same basic LINQ syntax to query XML documents. LINQ to XML uses System.Xml.Linq namespace. Here are example for this. In this example we have Books.xml file which contains books details. Now we query this xml files and display it's data in grid using LINQ . In LINQ to XML we have to provide mapping logic in LINQ query. Read More...

Tuesday, 29 May 2012

Paging Query Using LINQ

Using LINQ we can achive paging logic in your application much easier by exposing the Skip and Take methods. The Skip method enables you to skip a defined number of records in the resultset. The Take method enables you to specify the number of records to return from the resultset. By calling Skip and then Take, you can return a specific number of records from a specific location of the resultset. You can use Skip and Take methods Take method in any LINQ Query either Simple query or Joining Query. Read More...

Monday, 28 May 2012

Joining using LINQ in LINQ To Objects

LINQ also supports the joining of data from different collections using a familiar SQL-like join syntax. Here are sample example of this. In this example there is book class which has PublisherId field , this fields contains only numeric values. Read More...

Friday, 25 May 2012

Different LINQ operators in LINQ To Objects

LINQ also includes many operators you can execute on enumerable objects. Most of these operators are available to use and are similar to operators that you find in SQL, such as Count, Min, Max, Average, and Sum. Here are sample example of using this operators. Read More...

Thursday, 24 May 2012

Grouping data using a LINQ query In LINQ To Objects

You can also perform Grouping in LINQ to Objects using a LINQ Query. This LINQ query uses the group keyword to group the Books data by pages. Additionally, because a group action does not naturally result in any output, the query creates a custom query projection using the techniques discussed earlier. Using LINQ to do this grouping enables you to significantly reduce the lines of code required. This is also improve the readability and clarity of the code. Read More...

Wednesday, 23 May 2012

Simple filter query with LINQ To Objects

You always need to filter the records based on certain fileds. Using LINQ query you are able to get this. Here are sample example for that. Read More...

Tuesday, 22 May 2012

Linq delayed execution behavior

An interesting feature of LINQ is its delayed execution behavior. Means that even though you may execute the query statements at a specific point in your code, LINQ is smart enough to delay the actual execution of the query until it is accessed. Read More...

Monday, 21 May 2012

Data ordering and custom field name using LINQ To Objects

You can also set data ordering and custom field name using linq query. Here are sample example for that. In this example Title and ISBN Column names changed to FullTitle and ISBNNumber, and data is order by Title in ascending. You can also set multiple column by comma like ", bl.ISBN". And also set fordescending order. Read More...

Thursday, 17 May 2012

Get selected fields LINQ query using LINQ To Objects

There are situations where you do not want all fields in LINQ query you want only selected fields. You can also say that Creating a custom projection with LINQ. Here are sample example for that. In this Example we only want Title and ISBN Fields. Read More...

Wednesday, 16 May 2012

Simple query with LINQ To Objects

Now a days LINQ is more popular for query. We can also query to object using LINQ. Here are sample example of select query LINQ To Objects. Read More...

Thursday, 3 May 2012

Get multiple selected items from listbox using LINQ

If you want to get multiple selected items from listbox without using FOR loop using LINQ you can achieve that. Here are sample Example For this: Read More...

Wednesday, 2 May 2012

Convert List of Object's Value to List of Integer in C# Programming

There are many situations where you want to convert List's Value to List. Using Linq Method ConvertAll we can achieve in one sentence. LINQ Namespace is System.Linq Here are sample Example For this: Read More...

Monday, 30 April 2012

Convert List of Integer to List of String

There are many situations where you want to convert List to List. Using Linq Method "ConvertAll" we can achieve in one sentence. LINQ Namespace is System.Linq . Here are sample Example For this: Read More...

No comments:

Post a Comment