ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Forum AtoutFox : Re: C# replace avec mot clés reservés   

Sujet

rss Flux RSS des derniers messages

Vous devez vous identifier pour pouvoir poser une question ou répondre.

ven. 13 juin 2008, 17h47
OlivierH
atoutfox.public.association

Re: C# replace avec mot clés reservés

Merci Greg,

je confirme que le cValeur.Replace("\"","")

Fonctionne !

Olivier,



Gregory a écrit :
> Explication ...
>
>
> Working with Strings
>
> *Escape Characters*
>
> Escape characters such as "\n" (new line) and "\t" (tab) can be included
> in strings. The line:
>
> C#
> <javascript:CopyCode('ctl00_rs1_mainContentContainer_ctl06CSharp');>
>
> 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#
> <javascript:CopyCode('ctl00_rs1_mainContentContainer_ctl07CSharp');>
>
> 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#
> <javascript:CopyCode('ctl00_rs1_mainContentContainer_ctl08CSharp');>
>
> string p1 = "\\\\My Documents\\My Files\\";
> string p2 = @"\\My Documents\My Files\";
>
> _____________
>
> "OlivierH" <"nospam[contact]"@planitron.com
> <mailto:"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=0000002420
20 286 messages dans le forum • Liste complète des messages

www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2026.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3