| Subscribe via RSS

C# 3 Conversion Extension Method Library 1.0

September 19th, 2007 | 10 Comments | Posted in C#

If you have had a chance to muck around with the new language features of C# 3 in the latest beta of Orcas, I’m sure you will be as much of a fan of extension methods as I am. The ability to package little ‘lumps’ of functionality and add them onto objects that I use every day is a lot of fun.

I use the .ToString() method habitually so I thought I’d build a little library to perform some other .ToWhatever methods on some of the basic datatypes. So for example, the String datatype has .ToBool, .ToInt32, . ToDecimal etc. extended into it. The int32 datatype has .ToChar, .ToFloat etc. etc. It’s a nice little utility class that I hope you will find of some use. Download it and have a little dig around to see what the library is capable of.

Also, I’ve added in a couple of string manipulations as extensions too.

To reverse a string we have string.Reverse, to proper case a string we have string.ProperCase ( so for example, “jon davies” becomes “Jon Davies” ). I’ve also added string.Left and string.Right extensions, just because VB has them and C# doesn’t!! string.Left(3) returns the first 3 characters in a string, string.Right(3) returns the last 3.

Anyway, it was a lot of fun writing this – I’m going to keep adding new useful extensions to the library, so don’t forget to bookmark this site and keep an eye out for updates.

Edit: I’ve changed the name of the article thanks to the advice of posters on DotNetKicks and James to be 3.0 centric not 3.5. Apparently there is a bit of confusion as to the naming of the new updates, so it’s the .NET framework 3.5 and C# 3. Thanks for the tip off!

[download#1#image]
kick it on DotNetKicks.com

Get up to speed with Visual Studio 2008

September 18th, 2007 | Comments Off | Posted in Framework, Productivity

The Visual Studio 2008 sessions at Mix 07 UK were really exciting events. There is lots of great new functionality built in, and it’s useful too! Unfortunately, ‘new’ and ‘useful’ don’t always go hand in hand when it comes to software, but elements like spilt view editing, enhanced CSS support, LINQ, the new ListView control etc. are things that I know I will be using on a a daily basis.

Here is the link to the Microsoft training videos that are already up – there are plenty more to come too.

Mix 07 UK – All the free swag I mooched

September 13th, 2007 | Comments Off | Posted in Mix07

I was going to write an insightful and perceptive review of the entire Mix 07 UK conference, but work commitments meant I was a bit late to the party, and loads of other people have done a more than decent job here, here and here.
So instead, I thought I’d take you on a pictorial journey through the free stuff I managed to blag! So here it is, listed in order of complete and utter awesomeness!!

1. A plastic bag with msdn written on the side.
13092007025
Ok Ok calm down – nothing special I know, but look what’s next – it’s….

2. A paper bag with Mix Uk written on the side
13092007026
W00t!! We are cooking now! Look at the graphics!! It’s like the total embodiment of Silverlight rendered in green ink!

3. A plastic pen with msdn written on the side
13092007022
I haven’t tested it yet, but I’m confident that it will come up to the high standard of engineering we have come to expect from all Microsoft products!!

4. Random DVD
13092007019
I don’t know what is on this DVD….I’d like to think that Halo 3 is on it, but it’s probably VB 6.

5. Sweets for Dummies
13092007021
Try and imagine what corpse vomit tastes like and you are not far from the flavour that these jelly treats disperse.

6. Microsoft socks
13092007020 
For keeping your feet warm obviously

7. A stopwatch with msdn written on it
13092007024
This is actually a decent bit of kit. Maybe I can use it to time how long it takes for Visual Studio to boot up or switch from design to HTML view! Arf!!

8. A small wooden box with some note paper in it.
13092007012
Hey, I could use this in conjunction with the pen to write Scott Guthrie fan letters! There was a developer panel called ‘Client versus Cloud’ on day 1 of the conference. I imagine ‘Cloud’ refers to the gang of nerds that surrounds The Guth between each session.

9. A 1Gig USB keychain with Conchango written on the side.
13092007023
I wonder what Conchango means? Is it spanish for ‘fill it full of data and then lose it down the back of the couch’?

10. A full version of Windows Vista Ultimate
13092007018
Hoorah! Top of the range OS goodness!!

11. A full version of Expression Studio
13092007017
I’m actually genuinely made up with this -  it looked absolutely awesome at the conference and I’d deffo recommend it as an essential purchase for all ASP.NET developers.
kick it on DotNetKicks.com

Mix 07 UK Day 1

September 11th, 2007 | 3 Comments | Posted in Mix07

Got the train early down to that there London for the UK version of the Mix 07 event. With my whippet and flat cap I boarded the redeye from lime street at a brain popping 5.45 am to get to the conference center at 8.30.

The freebie count is pretty low right now, but I have it on good authority that this will improve dramatically at close of play tomorrow. Did get a nice little USB thing that apparently has some sort of fancy WPF powered content on it, but to be honest, it only looked ok at the demo.

The keynote contained all the stuff you would expect from a Microsoft keynote in the year 2007: Silverlight, Linq, Windows Live Services. The Expression suite of tools looks to have matured considerably since the last time I paid them any attention, deffo worth a go. The other demos in the keynote were of varying interest really. There was an Easyjet holiday booking demo that operated like any old AJAX powered website – nothing special.

There were hints to mobile Silverlight implementations and Linq running in the browser to cut down on server to-and-fro, but the highlight for me was a guy from Sage who did something as simple as converting a PDF to an XPS file and getting it going in the browser, complete with validation and computed entries, all powered by Silverlight and a bit of ropey looking Python. For some reason it really resonated with me, and pointed to a world where the UI is not just a load of flashy gradients and a movie – a world where Silverlight can add real value to form driven applications.

The Windows Live session was good, not my cup of tea, but definitely lots of interesting stuff in there. Anyway, currently sitting in the developer panel and then off for a few beers.

  • Cloud

    Ajax AmpliFeeder ASP.NET Blabnote C# Cloud Design EntityFramework Framework JavaScript JQuery LINQ Live Mesh MicroBlog Mix07 Mobile Productivity Rails Remix08 SDS Silverlight2 SQL SSDS TDD Telecommunications Uncategorized VOIP WCF Web 2.0 Webcast

  • @jonpauldavies