Possible Duplicate:
Parser for C#
In C# How To Read Entities from file(s) in a folder and read its Attributes. Example In Folder Companies.Entites if there are three entity files say
Company.cs
Office.cs
Contacts.cs
then how to read each file and process its attributes one by one.
Read you source files:
Create compiler parameters:
Add references to required libraries:
Compile your source to in-memory assembly:
Verify compilation successful:
And use Reflection to read compiled types info: