Welcome to Bilal Haidar [MVP, MCT] Official Blog Sign in | Join | Help

Browse by Tags

All Tags » C# 3.0   (RSS)

101 LINQ Samples

Here is a very interesting link on LINQ! http://msdn2.microsoft.com/en-us/vcsharp/aa336746.aspx Regards
Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

Extension Methods in C# 3.0 and ASP.NET Code-Inline

I was customizing a ListView today to show a small key gif beside each article listed to indicate that the article requires a login to be viewed based on whether the user is authenticated or not. So I decided to use inline checking to see if the current
Posted by BilalHaidar [MVP] | 0 Comments
Filed under: ,

Extend System.Web.HttpResponse with a WriteLine method

While working with Console applications, you always use Console.WriteLine. I always got bothered why the HttpResponse has only Write or WriteFile. Why can't we have WriteLine? Many times you need to print something on a web page and also print a break
Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

LEFT OUTER JOIN in LINQ To SQL

I was practicing a little bit on using Linq to Sql, and had this scenario: Customers and Orders tables in Northwind Database. I added a new customer with no records, I wanted to apply a left outer join to get customers whose CustomerID starts with letter
Posted by BilalHaidar [MVP] | 4 Comments
Filed under: , ,

Automatic Proeprties

In every 3-tier application we develop, there is always a need for model objects, which are nothing but classes we use to pass between DataAccess, Business, and UI layers. These classes contain only simple properties that represent the columns of a Data
Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

Implicitly Typed Local Variables

Implicitly Typed Local Variables is a general prupose way of declaring variables without the need to specify the data type. The data type will be infered implicitly from the initializer data. It is strongly typed variable that cannot take as input a data
Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

Extension Methods

Extension methods are a way to extend the functionality of existing types by defining methods that can be invoked either by using the normal instance method syntax or in a static way. They are defined in a static class, and each extension method should
Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

Anonymous Types

Anonymous types is a new feature of C# 3.0. It allows developers to creat local objects without the need to have a real signature of a class. This is helpful sometimes, when you have methods that take as input a large number of input parameters. What
Posted by BilalHaidar [MVP] | 0 Comments
Filed under:

Lambda Expressions

1. Lambda Expressions have been introduced as an improvement to the anonymous methods in C# 2.0 as a way to make them more compact. 2. Lambda expression consists of: . Parameter List . => . Expression 3. Parameters of Lambda Expression can be implicitly
Posted by BilalHaidar [MVP] | 0 Comments
Filed under: