I am trying to pull the project name using the reflection, but during the substring method it give me \"index out of bound error\".
string s = System.Reflec
I would try accessing the AssemblyTitle Attribute in your AssemblyInfo file. Location of any assembly may not be the same as the project name. Try this:
Assembly a = Assembly.GetEntryAssembly();
AssemblyTitleAttribute titleAttr = (AssemblyTitleAttribute) a.GetCustomAttributes(typeof(AssemblyTitlenAttribute), false)[0];
Console.WriteLine("Title: " + titleAttr.Title);
hth