Lets say I have the string:
"MyNamespace.SubNameSpace.MyClassName"
How do I extract just everything after the last period, "MyClassName"
Use String.Substring and String.LastIndexOf methods.
string str = "MyNamespace.SubNameSpace.MyClassName";
string str1 = str.Substring(str.LastIndexOf('.') + 1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With