Java and Groovy can do it. Why not C# and PowerShell.

by Doug Finke on May 13, 2008

in C#,Groovy,PowerShell

David Bergman presented Groovy: Java++ by being Java– at Lab49 which inspired me to record this 7min video doing the same with C# and PowerShell.

Best viewed in IE.

Press Ctrl-Shift-G if you want to speed up the presentation.

{ 2 trackbacks }

C# und Powershell mischen « Uwes kleines Technikblog
10.19.09 at 2:03 pm
My PowerShell Video Is Considered A Classic
05.11.10 at 8:45 pm

{ 5 comments… read them below or add one }

Daniel Chait 05.14.08 at 10:14 am

Url for the video is broken – has an extra period before “html”.

Jason Archer 05.14.08 at 11:32 am

Even more PowerShelly:

“The total length of the names of the higher spirits is {0}” -f (“Luke”,”Daniel”,”David”,”Jesus” | Measure-Object Length -sum).sum

Sergey Kogan 05.15.08 at 9:53 am

To make it fair to C# we gotta optimize it a bit as well:

static void Main(string[] args)
{
Console.Out.WriteLine(“Total count: {0}”, args.Aggregate(0, (total, arg) => total + arg.Length));
}

Jimmy 05.12.10 at 2:04 pm

To make it fair to C# you use Sum ;)

new[] { "joe", "john", "jeff", "jane" }.Sum(i => i.Length);

Doug Finke 05.12.10 at 3:02 pm

@Jimmy. True ;)

You still need to go through the compile and execute steps.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>