Sign in
United States (English)
Brasil (Português)
Česká republika (Čeština)
Deutschland (Deutsch)
España (Español)
France (Français)
Italia (Italiano)
Россия (Русский)
대한민국 (한국어)
中华人民共和国 (中文)
台灣 (中文)
日本 (日本語)
香港特别行政區 (中文)
.NET Framework Developer Center
Home
Library
Learn
Downloads
Support
Community
Forums
.NET Framework Developer Center
>
.NET Development Forums
>
64-Bit .NET Framework Development.
>
String Replace functionality
Ask a question
Search Forums:
Search 64-Bit .NET Framework Development. Forum
Search All .NET Development Forums
Search All MSDN Forums
String Replace functionality
Saturday, October 24, 2009 9:25 AM
ashlesh.patel
0
Sign In to Vote
hello all,
I need to replace "(double quotes) with the ""(2 times double quotes) in a string.
I have tried it with the tempstr.Replace(""","""") but not getting success.
Please help me out ASAP.
Best Regards,
Ashlesh Patel
Reply
Quote
Answers
Saturday, October 24, 2009 2:46 PM
nobugz
MVP
, Moderator
0
Sign In to Vote
using System;
class Program {
static void Main(string[] args) {
string tempstr = "Hello \"world\"";
Console.WriteLine(tempstr);
tempstr = tempstr.Replace("\"", "\"\"");
Console.WriteLine(tempstr);
Console.ReadLine();
}
}
Please use this forum only to ask questions about 64-bit .NET framework development.
Hans Passant.
Marked As Answer by
eryang
MSFT
, Moderator
Wednesday, October 28, 2009 7:28 AM
Reply
Quote
All Replies
Saturday, October 24, 2009 2:46 PM
nobugz
MVP
, Moderator
0
Sign In to Vote
using System;
class Program {
static void Main(string[] args) {
string tempstr = "Hello \"world\"";
Console.WriteLine(tempstr);
tempstr = tempstr.Replace("\"", "\"\"");
Console.WriteLine(tempstr);
Console.ReadLine();
}
}
Please use this forum only to ask questions about 64-bit .NET framework development.
Hans Passant.
Marked As Answer by
eryang
MSFT
, Moderator
Wednesday, October 28, 2009 7:28 AM
Reply
Quote
Wednesday, November 04, 2009 9:14 AM
ashlesh.patel
0
Sign In to Vote
Hi,
Thank you very much for you answer.
Regards,
Ashlesh Patel
Reply
Quote
Need Help with Forums? (FAQ)
© 2009 Microsoft Corporation. All rights reserved.
Manage Your Profile
|
Terms of Use
|
Trademarks
|
Privacy Statement
|
Contact Us