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.Reflection.Assembly.GetExecutingAssembly().Location;
int idx = s.LastIndexOf(@"");
s = s.Substring(idx, s.Length);
I don't understand why it is giving error on the third line.
Plz Help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…