# How to List Odd Numbers from a List of Integers using Lambda Expression in C#?

Are you looking out for a simple logic to retrieve the odd numbers from the list of integers using Lambda Expression in C#? Below is a sample code snippet demonstrating how to do it. How to List Odd Numbers from a List of Integers using Lambda Expression in C#?

# How to List out only Even Numbers from a List of Integers using Lambda Expression in C#?

Below is sample code snippet that demonstrates how to list out only even numbers from a list of integers using Lambda Expression in C#. How to List out only Even Numbers from a List of Integers using Lambda Expression in C#?

# How to List out Even Numbers from a List of Integers using LINQ in C#?

Below is sample code snippet that demonstrates how to list out only even numbers from a list of integers using LINQ? How to List out Even Numbers from a List of Integers using LINQ in C#?

# Example to demonstrate Collection Initializers in C#

Below is a sample code snippet demonstrating the usage of Collection Initializers in C#. Example to demonstrate Collection Initializers in C#

# How to Apply LINQ Distinct on a particular property in C#?

Do you want to get the distinct records from a list based on a particular property using LINQ in C#?. Below is a code snippet that demonstrates how to do it. How to Apply LINQ Distinct on a particular property in C#?

# How to Create Pivot Data using LINQ in C#?

Are you looking forward to create a pivot data using LINQ in C#, here we go. How to Create Pivot Data using LINQ in C#? Below is a sample code snippet that demonstrates the creation of the Pivot Data using LINQ and C#?

# How to compare two Byte Arrays in C#?

Are you looking to compare two array of bytes in C#? Below is a sample code snippet that demonstrates how to do it. How to compare two Byte Arrays in C#?

# How to mark a class as Obsolete or Deprecated in C# ?

Sometimes , you may want to mark a class or method as deprecated so that the you dont want to use the class any more and also want to let know , other developers that the class is obsolete . You can do that by using the Obsolete attribute as shown below . The Obsolete attribute also includes 2nd parameter (boolean) . When this valus…

# How to Convert a Stream to Byte Array in C# 4.0 ?

One of the simplest way to convert a stream to byte array in C# 4.0 is to use the MemoryStream and perform the CopyTo operation on the source stream to the Memory Stream. How to Convert a Stream to Byte Array in C# 4.0 ? Below is a sample code snippet on how to convert a stream to byte array in C# 4.0.

# How to Get the Maximum value from a List of String using LINQ in C# ?

In one of the previous article , we explained how to get the maximum value from a list of integer using LINQ query in C# . What happens when the column is a string instead of integer ?. Below are 2 possibilities on how to get the maximum value from a list of string. How to Get the Maximum value from a List of String…