Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

" in a string??

how do I put "'s in a string??

so
string s = @"I would like to say "HI", thanks";
0
Micki-Weaver
Asked:
Micki-Weaver
  • 5
  • 4
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
string s = @"I would like to say ""HI"", thanks";
0
 
hongjunCommented:
try this

string s = @"I would like to say \"HI\", thanks";
0
 
Micki-WeaverAuthor Commented:
nope
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
hongjunCommented:
??

string s = @"I would like to say \"HI\", thanks";
MessageBox.Show(str);  // should get what you want
0
 
hongjunCommented:
??

string s = @"I would like to say \"HI\", thanks";
MessageBox.Show(str);  // should get what you want
0
 
Micki-WeaverAuthor Commented:
thats what I thought but no, if you can compile that send me the exe
0
 
Micki-WeaverAuthor Commented:
i got around it for now with ulgy code,
string s = "say"+(char)34+@"HI"+(char)34+@" or not";
0
 
Micki-WeaverAuthor Commented:
I would still like to know if I can do it clean
0
 
hongjunCommented:
try this

string s = "I would like to say \"HI\", thanks";
0
 
Micki-WeaverAuthor Commented:
nice thanks
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now