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

Integrating OpenAI / ChatGPT in ASP.NET Core Web API

 This guide shows how to build a production-ready AI API using ASP.NET Core with: Clean Architecture, streaming responses, database storage,...