C
Chris Green
I would welcome any advice someone could offer on the follow problem.
I need to code a command line utility in c sharp. The utility will
accept a single parameter; the name of a cs file (not an assembly). I
then need to pick a method at random and display the text of that
method contained in the cs file.
Initially i wanted to use reflection but because the utility looks at
a source file instead of a dll I don't think this will work,
furthermore I don't think reflection allows the extraction of a
method's body.
Regular expressions could be an option but my regular expression
skills are lacking.
Any ideas?
TIA.
I need to code a command line utility in c sharp. The utility will
accept a single parameter; the name of a cs file (not an assembly). I
then need to pick a method at random and display the text of that
method contained in the cs file.
Initially i wanted to use reflection but because the utility looks at
a source file instead of a dll I don't think this will work,
furthermore I don't think reflection allows the extraction of a
method's body.
Regular expressions could be an option but my regular expression
skills are lacking.
Any ideas?
TIA.