Development Category

I’ve been very quiet recently. (I’m trying to not be so loud, Scott. ) You see, I’ve been writing a lot of ASP.Net code for a site I’m working on. And, to be honest, I’ve been having a lot of trouble. The source code for .Net has been very helpful, and I’ve learnt a […]

.Net 3.5 had some nice tricks in it. LINQ-to-XML was one of them. With the new "X"-types, you can make working with XML really easy.
VB.Net 9 takes it one step further, and lets you write XML in your code without strings.
"Hey Rich, that’s old news," I hear you say. "And who’s interested in VB […]

Have you wondered if and when you should use the new LINQ features in .Net 3.5?
Like, where should I put a new extension method? Should I use Func<T> or a custom delegate? How do I best implement a mix-in (extension methods on an interface)?
Well, Mircea Trofin has just published a new draft of some LINQ […]

While surfing around tonight, I came across ExtensionMethod.net, a database of useful Extension Methods for C# 3.0 and VB 9. I thought it might be useful, so I added a few of my own extension methods.

IComparable<T>.LessThan
int.Times
int.To

There aren’t many there yet, but there are one or two on there from Scott Guthrie.
Have you got any […]

Visual Studio 2008 has lots of goodies in it, like LINQ syntax, CSS editing, and testing tools. There’s a lesser-known feature which I really appreciate though - the “Remove and Sort Usings” command in the C# editor.
You activate the command by placing your cursor over the using statements and clicking on the right mouse-button.

[…]

I was recently reading Programming Ruby: The Pragmatic Programmers’ Guide, Second Edition, and came across this piece of example Ruby code:
[1,3,5,7].inject(0) {|sum, element| sum+element} -> 16 [1,3,5,7].inject(1) {|product, element| product*element} -> 105

Inject is a method which acts on an array by aggregating or accumulating the values within that array. It […]

A Pure ASP.Net Grid with Grouping

In: .Net, ASP.Net, Development

One of my favorite bloggers is Matt Berseth. Nearly once a week he comes up with a post where he does something amazing with the standard ASP.Net controls. I usually read his posts in awe. He’s really good.
But he’s not only is a good developer, he’s a great writer. Even though his posts are concise […]

Yesterday I thought I’d learn about the LinqDataSource in ASP.Net 3.5, and got an interesting surprise.
The new LinqDataSource can also be used with a LINQ-to-SQL model to perform updates. You simply add the DataSource to your page, set the table name, and set EnableUpdate to true. Then, using a standard DataControl, you can make updates […]

Does the ASP.Net MVC Framework Frustrate You?

In: .Net, Design, Development, MVC, Software

Silverlight, ASP.Net Ajax, LINQ, Astoria, ASP.Net MVC - there’s just tons of stuff coming out of Microsoft. And that’s not to mention the stuff people have seemingly forgotten about - ASP.Net Futures with IronPython (AWOL), Patterns and Practices Web Client Software Factory, WPF, WF, WCF and CardSpaces. Now the trend seems to be functional programming […]

Scott Hanselman just posted his latest article in his weekly source code series. He shows various ways of producing the Fibonacci Sequence using various languages. I found it really interesting, for two reasons:

I tried to do the C#3.0 one on my own after listening to a podcast about F#, and never could work it out. […]