Click here to Skip to main content
15,893,190 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone!This is Hemanth.I have a requirement that i need to find the method body from the .cs file.
I will select the file using OpenDialog control.

For example i have a file called "Employee.cs".In this File i have two methods which i have the read the each method with return type ,input parameters and Method body too and display in a listbox.
Posted

1 solution

Read it as a plain text file: you know where a method starts so you can work out where it ends (or, perhaps, where the next method begins) and then display everything in between.

I presume this is the same bit of homework that the other op has asked about?
 
Share this answer
 
Comments
hemantwithu 3-Aug-10 7:27am    
Suppose if we have lots of methods then how can we find the Method Starting and Ending Curl?Could u please help me?
R. Giskard Reventlov 3-Aug-10 7:32am    
You asked a question and it was answered: you have to work the rest out for yourself (or ask your tutor).
Rajesh Sajjanar 3-Aug-10 13:12pm    
Reason for my vote of 1
Reason for my vote 1
Question poster seeking help
reading it as plain text file is not the hint/ answer to the question, also in case of lot of methods
R. Giskard Reventlov 3-Aug-10 13:18pm    
Yes it is.
William Winner 3-Aug-10 13:22pm    
Reason for my vote of 5
that's what I would have said.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900