by JPSB via Develop With Passion® - Jean-Paul S. Boodhoo on 7/28/2009 9:00:00 PM
If you are using extension methods as a way to achieve more language oriented programming, there are lots of times you will want to be able to run extension methods against an anonymous method, but you will first have to close it to a well known delegate type before it is allowed. Here is a useful method if you want the starting point to be an anonymous method created on the fly:
publicclassCreateDelegate
{
publicstatic DelegateType of<DelegateType>(DelegateType body) {
return body;
}
Develop With Passion!
Original Post: Closing an anonymous method to a known delegate type
The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.