Posts for #C#

Update: Since this behavior hasn’t changed in VS 2010 RC, I have reported the problem to MS on their Connect Site: Dynamic Dispatch in C# doesn’t seem to work in simple case

I’m testing a few things with VS 2010 beta 2, around the “dynamic” keyword in C# 4.0. Mostly good, but there’s a bit of odd behavior – I thought I’d post about it, in case somebody has a comment, and so I don’t forget to test again once I go to the RC again (had it installed the other day, just to find there was no compatible IronPython release and no F# PowerPack either!). So here’s one thing that’s weird. I have two classes:

I was just trying out this piece of code:

dynamic expando = new ExpandoObject( ) {
  FirstName = "Oliver",
  Name = "Sturm"

I was in Amsterdam yesterday and did a talk for the dotNed user group on functional programming in C#. It’s always a great topic to talk about, and as usual everybody was very interested. We spent a bit more time on the Parallel Extensions than I was anticipating – the main reason I even start explaining Parallel Extensions is that I want to point out where their functionality ends – but that was fine. I think I was able to answer a bunch of questions on that, which is always a good thing.

A few of the guys were very happy about DevExpress and didn’t hesitate to say so either 😃 (And no, this doesn’t mean that everybody else was horribly unhappy about DevExpress, the “others” just didn’t say anything on the topic. 😃) Especially the Windows Forms controls were mentioned as being fantastically stable and feature rich, with brilliant documentation. Always nice to hear that!

When I was at DevDays in The Hague last month, all my talks were recorded. Until now I wasn’t aware that something was actually going to happen with these recordings 😃 Now the first one of them has been published on Channel 9, here:

I’m wondering if my FP in C# talk will also be published - while I was there, that one seemed to be the most popular one I did. I’ll ask!

The first stop of my Europe roundtrip is completed and I’m now in Slovenia for NT konferenca 2009. Last Friday I did a guest lecture at campus02 in Graz (which is in Austria, btw – had a few people asking me that), on functional programming in C#. I think there were around 40 people there, everything went smoothly and everybody was very interested – great! Here are the complete slides and samples which were used in the lecture:

Thanks to everyone who was there – I enjoyed myself and I hope you did, too!

Yesterday I recorded a video at TechEd about Functional Programming in C#, together with my colleague Gary Short. It’s up on the site now: Functional Programming in C#.

Unfortunately, the quality of the code demo in the video isn’t that great, my apologies for that. I’m not even going to go into what they made me do to the Apple logo on my laptop 😃 The info at the end of the video is supposed to read something like this: Oliver Sturm / DevExpress Blog: – well, you’re looking at it right now – Podcast:

I’ll be traveling down to London tomorrow for DevWeek 2009, where I’m going to do a workshop on F# on Monday and a few sessions on C# and F# on Thursday. Are you going to DevWeek? Are you going to be in London over the next few days? If you want to meet up, just let me know and I’m sure we can work something out! I’ll be twittering while I’m there, so following me on Twitter will be a good way of finding out where I am, if you fancy joining me for a pint!

As many of you have probably heard at some conference already, I have recently started writing a book for Wrox on “Functional Programming in C#”. I’ll try to blog about the topic a bit more, though I find myself not blogging very much at the moment… too much stuff to do. Anyway, I sat down with Keith and Woody at PDC this year and recorded a podcast on FP in C# – well, on some of the basics at least. If you’re interested, here it is:

Episode #23: Functional Programming in C# with Oliver Sturm

I have been working on getting a sample for using XPO from F#. My first sample was easily created back in January this year:

open DevExpress.Xpo
type Person = class
  inherit XPObject as base
  public new(session : Session) = { inherit XPObject(session);
    name = string.Empty

  val mutable private name : string

  member public x.Name
    with get() =
    and set(v) = <- v

let person = new Person(XpoDefault.Session)
person.Name <- "Wally"

So here they are, the slides and samples of that Functional Programming in C# 3.0 session. My apologies for the slight delay - I already received a few emails about it - but my flight home was cancelled yesterday and everything was a bit chaotic.

Functional Programming in C# 3.0