المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : [newbie] err



C# Programming
05-05-2009, 04:13 AM
See anything wrong here? Pasted out of MSDN to a Console application (C#).


delegate int del(int i); //error?
del myDelegate = x => x * x;
int j = myDelegate(5); //j = 2


VS 2008 / .NET 3.5

http://www.barakasoft.com/script/Forums/Images/smiley_confused.gif

http://msdn.microsoft.com/en-us/library/bb397687.aspx[^ (http://msdn.microsoft.com/en-us/library/bb397687.aspx)]

Jon