http://sheriframadan.com/2012/10/test-drive-php-5-5-a-sneak-peek/
Friday, October 26, 2012
Thursday, October 25, 2012
Tuesday, October 23, 2012
How to define anynomouse function in C# like Javascript?
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
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
Monday, October 22, 2012
Closure in C#
http://diditwith.net/PermaLink,guid,235646ae-3476-4893-899d-105e4d48c25b.aspx
static List<string> GetNamesStartingWith(string startingText)
{
return g_Names.FindAll(
delegate(string name)
{
return name.StartsWith(startingText);
});
}
static List<string> GetNamesStartingWith(string startingText)
{
return g_Names.FindAll(
delegate(string name)
{
return name.StartsWith(startingText);
});
}
Subscribe to:
Posts (Atom)