I read this in the MSDN documentation on anonymous methods (C # Programming Guide) , but I don't understand the part where the parameter list is omitted. It says:
In one case, an anonymous method provides functionality not found in lambda expressions. Anonymous methods allow you to omit the parameter list. This means that an anonymous method can be converted to delegates with different signatures. This is not possible with lambda expressions.
Could you give an example of skipping the parameter list for an anonymous method?
, - . , , - . , , 2- integer :
integer
Func<int, int, int> func = delegate(int x, int y) { return x + y; };
-, :
Func<int, int, int> func2 = (x,y) => x + y;
-. , :
Action act = () => Console.WriteLine("hello world");
, - , , . .
Source: https://habr.com/ru/post/1535439/More articles:What is the difference between res.render () and ejs.render () in Node.js and an Express application - javascriptGoogle+ api with dart chrome app - 403 Daily Limit - dartRCurl JSON data for JIRA REST add problem - rDifficulty inserting std :: unordered_multiset - c ++"Hack" to get the working parameter of the float parameter, but compromised in both g ++ and clang - c ++Generating a number (0,1) using mersenne twister C ++ - c ++SQL The correct way to handle function requests is functionКак добавить маркеры в R Shiny renderText? - rPython setuptools develops the command: "No module named ..." - pythonHow to make tesseract-ocr read from coordinates on the screen? - c ++All Articles