Head.SmackOnTable();

Contains Nuts.

Archive for the ‘Code Snippet’ Category

<%@ Page directive and language

without comments

Compilation Error

Compiler Error Message: BC32017: Comma, ‘)’, or a valid expression continuation expected.
<% Response.Write(”

Turns out if you dont declare the page language in the <%@ Page directive, it will default to a VB page and try to compile it that way.

Written by Monty

January 16th, 2009 at 11:54 am

Posted in .NET,Code Snippet

ForEach for IEnumerable

without comments

My Technobabble : ForEach, a simple but very useful extension method

This evening I was writing some code (Yay!) for an Xml based MEF catalog I am prototyping. I came across the need to invoke a set of methods on an IEnumerable that was returned from a LINQ to XML query. Unfortunately no such animal exists on IEnumerable.

This came in very useful, thanks Glenn – basically, I needed a ForEach to handle some lamda’s, on a Stack<T>, and this was very useful!

Written by Monty

December 11th, 2008 at 6:40 pm

Posted in Code Snippet,Misc