I am interested if it\'s possible using C# to write a code analogous to this Javascript one:
var v = (function() { return \"some value\"; })()
Here's how you could then utilize such a construct to enclose context - closure-
Control.Click += new Func((x) => new System.EventHandler(delegate(object sender, EventArgs e) { }))(valueForX);