Per Søderlind

I code for fun

String formatting in C#

Here's an excellent article showing how to utilize the String.Format() to the max. Example taken from the article:String.Format("{0:$#,##0.00;($#,##0.00);Zero}", value); This will output "$1,240.00" if passed 1243.50. It will output the same format but in parentheses if the number is negative, and will output the string "Zero" if the number is...

XmEdiL - free document editor

"XmEdiL is free document editor for XML and other languages.The primary use of XmEdiL is to quickly and easily author XML documents and XML related projects. XmEdiL contains everything you need to write, process, and debug XML documents. XmEdiL provide well-formedness check, validation and transformions of XML documents. The XPath...

The saga continues - Part 3: Binary Trees and BSTs

Anyone working with datastructures should follow Scott Mitchell's serie An Extensive Examination of Data Structures. In part three he looks at a common data structure that's not included in the .NET Framework, the binary trees. more ...

The keyboard is still the King

"When speed counts, the keyboard is still king. Almost all the actions and commands you can perform with a mouse you can perform faster using combinations of keys on your keyboard. These simple keyboard shortcuts can get you where you want to go faster than several clicks of a mouse....

SP/Invoke

"SP/Invoke generates code to allow C#, VB or JScript.NET programmers to invoke SQL Server stored procedures as if they were static methods on CLR classes. It was objectnation's submission to Chris Sell's 'Spend a Day With .NET' contest where it won the 'Best Use of SQL' prize (click here for...

Mono Roadmap

"The Mono project started in 2001 as an effort to implement the .NET Framework to Unix. To bring both the new programming model based on the Common Language Infrastructure and C# as well as helping people migrate their existing knowledge and applications to Unix. Mono today supports a wide variety...

N-Stuff - the tools you need

NAnt: XML-based build tool NCover: code coverage NDoc: turn XML comments into pretty HTML pages NPerf: a performance benchmark framework for .NET NUnit: code testing framework more ...

Microsoft Win32 to Microsoft .NET Framework API Map

This article identifies the Microsoft .NET Framework version 1.0 or 1.1 APIs that provide similar functionality to Microsoft Win32 functions. One or more relevant .NET Framework APIs are shown for each Win32 function listed. The intended audience for this article is experienced Win32 developers who are creating applications or libraries...

Object-Relational Persistence for .NET

This is cool: "With SQL Server Yukon, you could do the following: [sourcecode language='sql'] CREATE TABLE [dbo].[Person] ( [Id] [int] IDENTITY (1, 1) NOT NULL , [Person] [Person] NOT NULL ) ON [PRIMARY] [/sourcecode] The Person type is a .NET class. Columns in Yukon can be typed to custom .NET...

The Queue, Stack, and Hashtable

[c#] The guys from Rolla never disappoints. This article is to the point and gives a excellent introduction to the most used data structures; the queue, stack and hashtable. more ...