Mitsu's blog

Discussing topics related to .Net, WPF, C# and Linq

Browse by Tags

Tagged Content List
  • Blog Post: Some basic sample to make your code “Linq ready”

    Linq has been shipped with VS2008/.Net 3.5 and is not really new. If more and more people are getting used to its syntax, it’s sometimes hard to imagine all the scenarii where Linq to object can replace the classical way we program. During some Silverlight coding, I changed my code to make it run...
  • Blog Post: C# 4 expressions: loops, goto, label, if and even for ! [Part III]

    We now have block and variable support in our very small meta language. Let’s try to use this basic engine to add higher functionalities. .Net 4.0 expression API also brings new instructions such as Loop, Goto, Label, IfThenElse, etc. We will add them with always the same process: adding a comprehensive...
  • Blog Post: C# 4 expressions: variables [Part II]

    Reading the first part is mandatory ! The goal is still the same: enhance the C# 4 expression capabilities. Now we have block support, let’s find a way to add variables. We can not really ‘code’ something without them… In our first sample, the main lambda already had a parameter and we were...
  • Blog Post: C# 4 expressions: blocks [Part I]

    Since .Net 3.5 and Linq, the C# compiler is capable of generating expression trees instead of standard executable IL. Even if Linq opens the door of meta-programming (using the code to define something else, like a Sql query), we still have a lot of limitations. A C# expression is limited to a single...
  • Blog Post: Linq: how to share parameters between lambda expressions ?

    Before going into Linq, here is again one of my pictures: Le Louvre by night, Paris When using Linq to objects, you will quickly feel the need to pass some parameters from a method to another but it’s not so easy because each Linq method is not calling the following one. In a Linq sequence,...
  • Blog Post: Linq to Sql CompiledQuery container

    Before we go deep into Linq to Sql, I wanted to share with you one of my pictures made last week at Chamonix Mont Blanc from "L'aiguille du midi" during some days off. Ok now let's go. Here is just a little trick but with some interesting patterns that could be useful in some other contexts...
  • Blog Post: TreeSelector : playing with generics and type inference

    This piece of code is part of a personal bigger project that I am working on and I think there are interesting thing in it and I wanted to share it with you. I am trying to use generics and type inference to imagine new kind of method prototype. With all the stuff around Linq like lambda expressions...
  • Blog Post: Thinking about new C# method prototypes: object as dictionary

    I recently had to write a small Flickr API. I know many .Net API for Flickr already exist but I needed one for a Silverlight application. Whatever, it's only about building some querystrings so I did it by myself. It's been an opportunity to think again about a classical question: how to pass parameters...
  • Blog Post: Visual Linq query builder for Linq to Sql: VLinq

    Hi all, After almost one year of work and organization, I am very happy to share this project with you: http://code.msdn.microsoft.com/vlinq - new setup fixed (4/17/2008) The Visual Linq query builder is a Visual Studio 2008 addin. It's a designer that helps you create Linq to Sql queries in...
  • Blog Post: Linq GroupByMany dynamically

    Shawn asked me in my last post about GroupByMany how to use it dynamically. The answer is not easy. So here is a new post to answer to this interesting question. First you must learn a few things about being dynamic with linq. There is a very good sample from the C# team (actually we can consider...
  • Blog Post: Playing with Linq grouping: GroupByMany ?

    Linq is a great technology to manage data directly from your .Net language. One of its features is grouping. Many people understand grouping like it is defined in Sql. Linq is implementing grouping quite the same way. Let's discover this syntax and how to make consecutive groups easier. Then we...
  • Blog Post: Prime number product using Linq

    Linq is SO FUN !!! I have read this article from a french developer about Linq used to find the list of all the prime numbers < n : http://blogs.developpeur.org/raptorxp/archive/2007/11/26/quizz-linq-la-liste-des-nombres-premiers-en-3-clauses.aspx Here is another sample: let's try to find the prime...
  • Blog Post: How to implement a many-to-many relationship using Linq to Sql ?

    In this article, I will show one possible solution to implement many-to-many relationship using Linq to Sql. Let's begin with some definitions and what Linq to Sql offers. A “many to many” relationship between two entities defines a kind of bi-directional “one to many” relationship for each of...
  • Blog Post: Linq to bits !

    Following my previous post , let's see how to extend Linq to bits... To have a good understanding of what I am working on in this post, it's highly recommended to read my previous post: Enumerating Enums . In fact, this is part II. Using Linq natural extensions to enumerations we have all the benefits...
  • Blog Post: Enumerating Enums

    In this post i will expose a little solution to make it more easy to read different values stored in a single enum instance. This sample is written in C# 2.0 using iterators and operator overriding. Let's use a simple enum definition: [Flags] public enum Day { None = 0 , Monday = 1 , Tuesday = 2 ,...
Page 1 of 1 (15 items)