|
|
Browse by Tags
All Tags » C# 3.0
-
Here is a very interesting link on LINQ!
http://msdn2.microsoft.com/en-us/vcsharp/aa336746.aspx
Regards
-
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 user is logged in or not and accordingly show/hide the Image. The code is like ...
-
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 line, and you always had to append a ''<br>''.
Now, with the Extension Methods that ship ...
-
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 B such that, even if the Customer had no record in the Orders table, I wanted his/record to ...
-
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 Table that are retrieved from the database. As you can see, those objects need not any ...
-
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 type other than the one used on initialization time. This proves that ''var'' is not the same ...
-
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 be a static one. The first parameter for the extension method should be preceeded by ''this'', ...
-
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 you can do is simply create a new anonymous type and use it through out the local body of the ...
-
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 or ...
|
|
|