jeudi 14 janvier 2016

How to get class name from a string?

I want to detect class from a string.

example;

string test = "class Test { string Name; string PassWord;}"    
string[] classNames = GetClassNamesFromString(test);   
//Now string[0] has to be Test

Or more complex

string test = "[Export(typeof(ITest))]public class Test : ITest { }"    
string[] classNames = GetClassNamesFromString(test);   
//Now string[0] has to be Test





Aucun commentaire:

Enregistrer un commentaire