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

Opps Part 1 : Abstraction

  Abstraction in C# is a fundamental concept of object-oriented programming (OOP) that allows developers t...