468,140 Members | 1,462 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,140 developers. It's quick & easy.

How to escape "{"

Hi:

How could I escape "{" in Console.Write(), i.e. I want output like -- { 1234
}, how could I do it in one Console.Write()?

thx.
Jul 21 '05 #1
4 1299
just double it

"Peter" <Pe***@discussions.microsoft.com> wrote in message
news:C8**********************************@microsof t.com...
Hi:

How could I escape "{" in Console.Write(), i.e. I want output like -- {
1234
}, how could I do it in one Console.Write()?

thx.

Jul 21 '05 #2
Actually, I try following:
Console.Write( "{{0}}", 12 ); //ok
Console.Write( "{ {0} }", 12 ); // throw exception.

I really want to write, after simplified, something like

class abc
{
public:
abc();
};

"Luc E. Mistiaen" wrote:
just double it

"Peter" <Pe***@discussions.microsoft.com> wrote in message
news:C8**********************************@microsof t.com...
Hi:

How could I escape "{" in Console.Write(), i.e. I want output like -- {
1234
}, how could I do it in one Console.Write()?

thx.


Jul 21 '05 #3
Thx, I got it

"Luc E. Mistiaen" wrote:
just double it

"Peter" <Pe***@discussions.microsoft.com> wrote in message
news:C8**********************************@microsof t.com...
Hi:

How could I escape "{" in Console.Write(), i.e. I want output like -- {
1234
}, how could I do it in one Console.Write()?

thx.


Jul 21 '05 #4
triple in your case, isn' it :-)

/LM

"Peter" <Pe***@discussions.microsoft.com> wrote in message
news:2D**********************************@microsof t.com...
Thx, I got it

"Luc E. Mistiaen" wrote:
just double it

"Peter" <Pe***@discussions.microsoft.com> wrote in message
news:C8**********************************@microsof t.com...
> Hi:
>
> How could I escape "{" in Console.Write(), i.e. I want output like -- {
> 1234
> }, how could I do it in one Console.Write()?
>
> thx.


Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Lyn | last post: by
3 posts views Thread by NecroJoe | last post: by
5 posts views Thread by Prince Kumar | last post: by
2 posts views Thread by Tim Marshall | last post: by
4 posts views Thread by Peter | last post: by
reply views Thread by Jeff Groves | last post: by
27 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.