Category: C#

LIKE operator in LINQ

Does the LINQ(Language Integrated Query) have the LIKE operator like the one we have in the SQL Server or any other databases ? I have been searching for similar function in LINQ and below are …

DebuggerDisplay Attribute in C#

The DebuggerDisplay is useful to quickly view the customized output of a class which in turn can display more meangful text during debugging. Below is an example. Assume the class Student contains the following properties …

Merge 2 DataTables in C# and ASP.NET

The Merge() method of the datatable is used to Merge a datatable (second datatable) and stores the result to the first datatable. For example , assume the following datatables are present EmployeeDataTable1 and EmployeeDataTable2 . …

How to cast integer to Enum in C# ?

This is a really simple one . Below is a simple example of an enum called “Designation” defined with the values Trainee,SoftwareEngineer,Architect. enum Designation { Trainee, SoftwareEngineer, Architect } We can cast the integer value …