Thursday, June 19, 2014

Split string with delimeters asp.net C#

string str="test | from \ chetan"
string[] Fname = str.Split(new Char[] { '"', '|', '\'' }, StringSplitOptions.RemoveEmptyEntries);

Result will be:
test
from
chetan

=> StringSplitOptions.RemoveEmptyEntries - 
It remove blank from array

No comments:

Post a Comment

📱Build WhatsApp Bot using .NET + OpenAI

   In this article, you will learn how to build a real-world WhatsApp chatbot using ASP.NET Core and OpenAI. This bot can automatically repl...