CFDump on .NET

I have been developing almost exclusively in C# .net for about a year now. In that time, I have wished for some of the language functionality in ColdFusion to find its way into C#.

I have been using Visual Studio 2008 since it came out, and I found a project that is used to test Linq called ObjectDumper. It compiles a class called ObjectDumper that can be used for dumping the value of just about any object into a command line.

Here is some sample syntax;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DumperTest
{
class Program
{
static void Main(string[] args)
{
var myObject = new[]
{
new { Name = "Chris Smith", PhoneNumbers = new[] { "206-555-0101", "425-882-8080" } },
new { Name = "Bob Harris", PhoneNumbers = new[] { "650-555-0199" } }
};

var myPets = new[]
{
new { name = "Spike", number=9 },
new { name = "Snoopy", number=7 }
};

ObjectDumper.Write(myObject);

ObjectDumper.Write(myPets);
}
}
}

Comments
barry.b's Gravatar so putting watches onto objects and being able to drill down into object properties or elements of array collections no good for you?
# Posted By barry.b | 4/25/08 9:45 AM
David Fekke's Gravatar that requires the debugger, which is fine. I like the object dumper because it works in the command line.
# Posted By David Fekke | 4/25/08 10:02 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.6.001.