Click here to Skip to main content
15,884,237 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have two string Dynamically one string value is withinbracket another string value is normally i want replace the value for without bracket string how to possible.Please give answer .
Posted
Updated 22-Sep-14 20:15pm
v2
Comments
Sanchayeeta 23-Sep-14 1:31am    
Can you please explain your question bit clearly. If possible explain with example.

We have string.Replace method in .net.
Gihan Liyanage 23-Sep-14 1:31am    
replace with what ?? Do you want to add brackets for the strings without brackets ??
[no name] 23-Sep-14 1:34am    
to whom you want stringwithbraket to only string
string to stringwithbraket

clear ur requirment
Sergey Alexandrovich Kryukov 23-Sep-14 2:17am    
What have you tried so far?
—SA

Your question is not clear

Are you looking for this
C#
var stringOne = "{abcd}";
var stringOneWithoutBracket = stringOne.Trim('{','}');
 
Share this answer
 
This is how: http://msdn.microsoft.com/en-us/library/system.string%28v=vs.110%29.aspx[^].

The transition from reading of this original MSDN documentation to working code is the part of your minimal professional requirements. I don't think such elementary thing can be effectively taught, but if you get the code from someone else, you will also loose the change to get learn this skill, so, please do it on your own.

—SA
 
Share this answer
 

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