ven. 13 juin 2008, 15h37
Gregory
atoutfox.public.association
Re: C# replace avec mot clés reservés
Explication ...
Working with Strings
Escape Characters
Escape characters such as "\n" (new line) and "\t" (tab) can be included in strings. The line:
C#
string hello = "Hello\nWorld!";
is the same as:
Hello
World!
If you want to include a backward slash, it must be preceded with another backward slash. The following string:
C#
string filePath = "\\\\My Documents\\";
is actually the same as:
\\My Documents\
The @ Symbol
The @ symbol tells the string constructor to ignore escape characters and line breaks. The following two strings are therefore identical:
C#
string p1 = "\\\\My Documents\\My Files\\";
string p2 = @"\\My Documents\My Files\";
"OlivierH" <"nospam[contact]"@planitron.com> wrote in message news:g2tsam$5ls$1@news.niouzes.net...
> Bonjour à tous,
>
> j'aimerais faire un replace avec des mots clés reservés
> savez vous comment faire en c#
> En fox on ferait comme ca
>
> StrTran(cValeur,["],[ ])
>
> Le guillement bloque,
>
> je me rappellais d'un operateur pour que c# ne teste pas
> mais bon ca ne semble pas marcher.
>
> enfaisant soit @ ou autre je ne sais plus
>
> cValeur.Replace(@""","")
>
> d'avance merci
> olivier
>
--
Gregory
Permalink : http://www.atoutfox.org/nntp.asp?ID=0000002419