<%@ Page directive and language

Posted by Monty on January 16th, 2009

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.

ForEach for IEnumerable

Posted by Monty on December 11th, 2008

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!


Copyright © 2007-2010 Muntedhar Alhakim. All rights reserved.