?
Solved

Replace a Char in string , using c#

Posted on 2011-10-06
3
Medium Priority
?
371 Views
Last Modified: 2012-05-12
Hello Experts,

I just need to replace a character in position 2.

e.g string = "FFCA"

I need to replace character in position#2 to E. Like this FECA.

How can I do that.

Thanks,
ASPDEV
0
Comment
Question by:ASPDEV
3 Comments
 
LVL 22

Accepted Solution

by:
pivar earned 2000 total points
ID: 36927894
Hi,

You could do like this:

"FFCA".Remove(1, 1).Insert(1, "E");

/peter
0
 

Author Closing Comment

by:ASPDEV
ID: 36931133
Thanks!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question