1

I have set of .cs files. I want to extract the list of functions from those files.

I want to export the list into a CSV file with the following columns.

FileName FunctionName

Is there any inbuilt tool/utility to do that? or any other quick way (might be using powershell)?

4

1 回答 1

0

PS中没有内置函数,你需要使用RegEx。如果您已经编译了 Assembly,您可以使用 Get-Member 或反射。

在大多数情况下,这个 RE 可能就足够了:

^[ \t]*(public|protected|private|static).*\([^;]*$

但它可以改进,例如看到这个。对于可以帮助您查看帖子的 3thd 方工具。

于 2012-10-05T17:25:03.440 回答