|
Hi fellows, a question from my side again! Would really need your expertise!
Is therer a way (maybe with Reflection) to get the definition of a Function?
Description:
I have a self defined Function (yeah I know dynamic, but here it's really neccessary, would take too long to explain):
dynamic func = new Func<int,int>((int i)=>{return 2*i;});
Chance to get to display the part {return 2*i;} programatically? (something like
MessageBox.Show("Function Code: {0}", functionCode);
(int i)=>{return 2*i;} would be fine as well, just if it makes any difference
Thank's in advance!
|
|
|
|
|
|
Thank you for the link, although it seems what I need to achieve cannot be done - at least not with C#. Looks like I have to save the function definition in an attribute.
D'oh
|
|
|
|