Click here to Skip to main content
15,562,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a string
so i want to remove double quotes using splite method
plz help me

string s = "\"siva\"";
       s = s.Replace("\"", "");
Share this answer
Member 10527033 4-Feb-14 5:21am    
i have split a output i have a string with double "siva"
can i do like this
string s="siva";
string v=s.Split('"');
i want result only siva...not "siva" please help me
Karthik_Mahalingam 4-Feb-14 5:26am    
u need using split only ?
Karthik_Mahalingam 4-Feb-14 5:30am    
string s = "\"siva\"";
string[] aray = s.Split(new char[]{'"'}, StringSplitOptions.RemoveEmptyEntries);
s = aray[0];

try to debug using break point and try to understand :)
Member 10527033 4-Feb-14 5:49am    
thank you very much... it is working...
Karthik_Mahalingam 4-Feb-14 5:54am    
use Trim

String = String.Trim('"')


string test = "*** Test ***";
string result = test.Trim(charsToTrim);
Share this answer
Member 10527033 4-Feb-14 5:37am    
hello karthy thank you for your reply...
but it is giving an error...

here is the problem
string s="siva"; //which is output of a split function
now i want to remove double quotes around the string...
i am a kindly help me with detailed example....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900