In Javascript you can define an anynomous function like:
var InJavasript = (
function(){
return "some value";
})()
In C#: (need specifiy a function type)
var InCSharp = (
(Func<string>)delegate(){
return "some value";
})();
http://msdn.microsoft.com/en-us/library/bb549151.aspx