LINQ To SQL Examples

In this post on LINQ To SQL Examples, I will explain how to create an application that manipulates and retrieves data from a database using LINQ to SQL. To begin with, let us first understand what is LINQ to SQL. Basically, it is a mechanism for database access and manipulation using database objects rather than using a …

Creating Jagged Arrays in C#

Jagged arrays in C# are two-dimensional arrays with the number of columns not necessarily the same for each row. As opposed to the two-dimensional rectangular arrays, we can define the different sizes of each row in a jagged array. In this post on Creating Jagged Arrays in C#, I will explain jagged arrays and their …

Learning Indexers in C#

C# language has an important feature called Indexer which allows us to represent objects as arrays. In this post on Learning Indexers in C#, I will discuss Indexers and also demonstrate their usage with the help of a few examples. Basically, an indexer is a syntactical convenience that enables us to work with arrays that …

Object Initializers in C#

Object Initializers in C# provide us a way to initialize objects without using constructors. Examples of Object Initializers in C# You can use the object initializer syntax to initialize an object as well as to initialize a collection also. In this section, you will find several examples of the usage of object initializers. Example 1: …