Home / ASP.NET Weblogs
All Tags » LINQ » C# » C# 3.0 (RSS)

Browse by Tags

Related Posts

  • Which is the ten thousand first prime?

    Prime numbers have a good deal of practical applications (for example in cryptography) but let's face it, even if they would have none, they would still be the favorite toy of mathematicians . In Problem 7 of Project Euler , we are asked to find the 10001st element of the famous list, my approach was...
    Posted to .NET at 9.400 ft above sea level (Weblog) by Edgar Sánchez on 05-02-2008, 12:00 AM
    Filed under: C#, Functional Programming, LINQ, Math, C# 3.0, Project Euler
  • Understanding C# 3.0 Features (8) Partial Method

    [ LINQ via C# series ] The is a very simple feature. From partial class to partial method Partial class is introduced by C# 2.0. With the partial keyword, the definition of one type is able to be divided into several files. For example, if creating a WinForm application project in VisualStudio, the MainForm...
    Posted to Dixin's Blog (Weblog) by Dixin on 12-16-2009, 12:00 AM
    Filed under: .NET, C#, LINQ, LINQ via C# Series, C# 3.0
  • Understanding C# 3.0 Features (6) Lambda Expression

    [ LINQ via C# series ] Lambda expression is another powerful syntactic sugar making C# functional. In this post, “Lambda expression” simply means “C# Lambda expression”. The native concept of lambda expression will be introduced in the later lambda calculus posts. According to MSDN : A lambda expression...
    Posted to Dixin's Blog (Weblog) by Dixin on 11-29-2009, 12:00 AM
    Filed under: .NET, C#, JavaScript, LINQ, LINQ via C# Series, Haskell, F#, C# 3.0, Functional Programming
  • Understanding C# 3.0 Features (5) Extension Method

    [ LINQ via C# series ] Extension method is a fancy and powerful syntactic sugar in C# 3.0. Extension methods are very important when writing functional style C# code. Define an extension method for a class When we define an extension method for a type, this extension method must: be a static method be...
    Posted to Dixin's Blog (Weblog) by Dixin on 11-28-2009, 12:00 AM
    Filed under: .NET, C#, LINQ, LINQ via C# Series, C# 3.0, Functional Programming
  • Understanding C# 3.0 Features (4) Anonymous Type

    [ LINQ via C# series ] This feature provides a way to create an instance without declare the type: var mark = new { Name = "Mark" , Age = 18 }; Since the type name is unknown at this time when writing code, this is called a anonymous type. Compilation At compile time, the compiler will generate the following...
    Posted to Dixin's Blog (Weblog) by Dixin on 11-27-2009, 12:00 AM
    Filed under: .NET, C#, LINQ, LINQ via C# Series, C# 3.0
  • Understanding C# 3.0 Features (2) Object Initializer And Collection Initializer

    [ LINQ via C# series ] Take this Person type as an example: public class Person { public string Name { get ; set ; } public int Age { get ; set ; } } Object initializer In C# 2.0 we create an Person instance and initialize it like this: Person person = new Person (); person.Name = "Mark" ; person.Age...
    Posted to Dixin's Blog (Weblog) by Dixin on 11-26-2009, 12:00 AM
    Filed under: .NET, C#, LINQ, LINQ via C# Series, C# 3.0
  • Understanding C# 3.0 Features (1) Automatic Property

    [ LINQ via C# series ] As the fundamental of LINQ, This chapter will explain the new language features of C# 3.0, all of which are syntactic sugars. This part is about the automatic property. In C# 2.0 a property can be declared like this: public class Person { private string _name; public string Name...
    Posted to Dixin's Blog (Weblog) by Dixin on 11-26-2009, 12:00 AM
    Filed under: .NET, C#, LINQ, LINQ via C# Series, C# 3.0
  • Understanding C# 3.0 Features (7) Query Expression

    [ LINQ via C# series ] This kind of code has been introduced again and again: var positive = from number in source where number > 0 orderby number descending select number.ToString( CultureInfo .InvariantCulture); This is called the query expression syntactical sugar, providing a T-SQL-like way to...
    Posted to Dixin's Blog (Weblog) by Dixin on 12-16-2009, 12:00 AM
    Filed under: .NET, C#, LINQ, LINQ via C# Series, C# 3.0
  • Understanding C# 3.0 Features (3) Type Inference

    [ LINQ via C# series ] The “var” keyword has been introduced from the beginning . It is a new language feature called type inference in C# 3.0. Local variable type inference Consider the local variable declaration and initialization: TypeName a = b; Since the type of the right side can determine the...
    Posted to Dixin's Blog (Weblog) by Dixin on 11-26-2009, 12:00 AM
    Filed under: .NET, C#, LINQ, LINQ via C# Series, C# 3.0, C# 4.0, Functional Programming, Dynamic
  • Understanding LINQ to SQL (11) Performance

    [ LINQ via C# series ] LINQ to SQL has a lot of great features like strong typing query compilation deferred execution declarative paradigm etc., which are very productive. Of course, these cannot be free, and one price is the performance. O/R mapping overhead Because LINQ to SQL is based on O/R mapping...
    Posted to Dixin's Blog (Weblog) by Dixin on 01-31-2011, 12:00 AM
    Filed under: .NET, C#, LINQ, SQL Server, TSQL, LINQ via C# Series, C# 3.0, LINQ to SQL
Page 1 of 1 (10 items)