Wednesday, August 14, 2013

get everything after a certain index in string c#

string str = "MyNamespace.SubNameSpace.MyClassName";
string str1 = str.Substring(str.LastIndexOf('.') + 1);

No comments:

Post a Comment

Complete Authentication System in ASP.NET Core using JWT

JWT (JSON Web Token) authentication is widely used for securing APIs in modern applications. In this article, we will build a complete authe...