C-Sharp

A tag for C#-related articles.

Casting types in .NET

In Java, there's only one way to explicitly cast a variable from one type to another, and that's using the bracket syntax. In .NET (well, C# anyway), there are a couple: the Java-esque bracket syntax and the as keyword. Whilst I have used both frequently in the past, a situation occurred a couple of days ago where I realised I needed to clarify what as did under the hood.

An Evaluation of Web Frameworks II.ii: Status Report

It's been a little while since I made any progress on this little project of mine, due to the downtime I suffered throughout December. I couldn't get access to my virtual machine server, so I wasn't able to restart the VM hosting my blog and my Subversion repositories; everything went down together.

As such, it's probably time for an update on where I've got to so far.

An Evaluation of Web Frameworks II.i: Introduction to ASP.NET MVC

ASP.NET MVC is still only a beta, although it has only recently gained this status from the previous "Tech Preview" releases. The rumour is that it will RTM as part of .NET 4.0.

Despite the beta status, it has a pretty solid feel to it, and it's obviously quite stable: Stack Overflow was developed with this framework. It integrates well with VS 2008 Pro SP 1, and promotes the use of Test-Driven Development, primarily through Microsoft's own Unit Testing framework (also known as MSTest). However, it will support other frameworks such as my preferred NUnit.

More on Message Passing!

I recently posted a question to Stack Overflow. This is a great developer community site run by Jeff Atwood and Joel Spolsky that's currently in private beta. It's a good mixture of discussion forum, Digg-style ratings' site, and wiki that promises to become a truly invaluable resource once development is complete; it's well on its way already! The idea is that ordinary developers post questions and the community responds, with both questions and answers being voted upon by the community.

I've included my question below to gain the issue a bit of extra exposure. If you have a stackoverflow.com account, please visit my question and post a response there, or vote on the question and any existing answers. Alternatively, please leave a comment on this post with your thoughts.

.NET Format Strings

.NET format strings rock. These are roughly equivalent to the old-school C-style sprintf() functions, with their %d, etc., symbols. There's some serious power to these strings, however; think PHP's date() function on acid, and for more than just dates.

None of this is likely to be new to all but the greenest of .NET developers (like me), but it's always worth reminding yourself of how great these things are.

Message Passing 2

As a follow-up to my previous post on message passing in a plug-in framework, I thought I'd post my solution to the problem. Now that I've finally reached a solution, that is...!

[Note: It would be worth reading the first post to get an idea of what I was trying to do. ]

Syndicate content