DCSIMG
C# 4.0 - IronShay

Browse by Tags

All Tags » C# 4.0 (RSS)

Slides and Code Samples from my Talk at LIDNUG - What?!? C# Could Do That???

On Thursday I had the honor to do a virtual talk at LIDNUG – the LinkedIn .NET User Group. A stage where lots of .NET celebs like Scott Gu, Jeffery Richter, Jeff Prosise and others have talked in the past. I’d like to thank all the attendees and the LIDNUG crew who made this possible – Inbar, Peter and Brian – you guys rock! About the talk – I focused on the dynamic capabilities of C#. Started with some black magic done using the dynamic keyword, then moved on to practice witchcraft with the combination...

LINQ Tip: Chain Ordering

Assuming you have the next code: public class Person { public string Name { get; set; } public int Age { get; set; } } public class Whatever { public void Do() { var people = new List<Person> { new Person {Name = "Shay Friedman", Age = 27}, new Person {Name = "Shawn Doe", Age = 51}, new Person {Name = "Elvis Presley", Age = 76} }; } } And now you want to order it first by name and then by age using LINQ. If you were to do that: var orderedPeople = people.OrderBy...
Posted by shayf | with no comments

C# Recorder using IronRuby

[This post is the second in my series of IronRuby samples. Read the first one here ] The release of Visual Studio 2010 Beta 2 and IronRuby .Net 4.0 Beta 2 CTP has brought some AMAZING abilities to the .Net world like the dynamic keyword. This keyword is a revolutionary little thing. It takes everything you know about C# and throws it away – explicit types, locating syntax errors in compilation time, compiled code… Sounds bad? well, it is just AWESOME!!! The dynamic keyword brings so much goodness...
Posted by shayf | with no comments

New IronRuby and IronPython Versions

Good news! IronRuby and IronPython have just been released with new and shiny versions! IronRuby 0.5 Download IronRuby 0.5 Adaptive compilation – performance boost! Removes ClrString. CLR strings are referred to as System::String Removes IronRuby library. "require 'IronRuby'" is no longer needed; IronRuby module is now a built-in module. Integer/Float operations for all CLR primitive numeric types System::Char and System::String methods so that they behave like an immutable UTF...

The dynamic Keyword Part 2 – IDynamicObject

This is the second part of my series about the new dynamic keyword in C# 4 (Read the first post here ). As I talked on the first post, the dynamic keyword does the dirty reflection work for you. This is very nice, but it’s like moving forward from a desktop computer to a 10kg laptop – you get to be more dynamic, but it’s still heavy to move around… The dynamic keyword holds a greater power inside, and this is what I’m going to talk about today – the IDynamicObject interface. What is the IDynamicObject...
Posted by shayf | with no comments
תגים:,

The dynamic Keyword Part 1 - Introduction

Firstly, in order to use the dynamic keyword, you'll have to download the VS2010 VPC image and work there. There is no way currently, to download and install Visual Studio 2010 on your local computer. Now we're ready to explore the future! So what is the dynamic keyword? The dynamic keyword is a new type of variable that will be added to the syntax of C# 4.0. Behind the scenes, the dynamic keyword is declared as an object with an attribute that indicates that this is a "special"...
Posted by shayf | 3 comment(s)