What does "Func<string, int> method = Work;" do?

I am not familar with this, please explain.

newbiewebSr. Software EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


   Func is the function name
  It will take 2 parameters. 1. string value, 2. integer value

It is like GetFirstName('abc def',3) = abc

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Read http://www.codeproject.com/KB/cs/DelegatesOMy.aspx for a detailed article on lambda expressions.

newbiewebSr. Software EngineerAuthor Commented:
It's used here:

static void Main()
  Func<string, int> method = Work;
  method.BeginInvoke ("test", Done, method);
  // ...
static int Work (string s) { return s.Length; }
static void Done (IAsyncResult cookie)
  var target = (Func<string, int>) cookie.AsyncState;
  int result = target.EndInvoke (cookie);
  Console.WriteLine ("String length is: " + result);
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

newbiewebSr. Software EngineerAuthor Commented:
Is Func a delegate
Yes it is... read the article I posted.. it'll tell you all you need to know about 'Func'.

newbiewebSr. Software EngineerAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.