Hi
I am having doubt on C# this topic, For example
string s = "Raj Kumar SO#Wo TEXAS AVE"
I have to check where # is present and have to take the part "Raj Kumar" alone not 'SO#' includes
Hi G.RajKumar,
Refer below sample.
Code
C#
protected void Page_Load(object sender, EventArgs e) { string str = "Raj Kumar SO#Wo TEXAS AVE"; int index = str.IndexOf(" SO#Wo"); string result = str.Substring(0, index); }
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.