Quantcast
Channel: Últimos conteúdos
Viewing all articles
Browse latest Browse all 14190

Converter para c#

$
0
0

Olá gente,

 

Seguinte tenho a seguinte função em delphi preciso converte-la para c#.

function Codifica(Const Str1: String): String;
var Mascara, Str2: String;
    PonM, PonS: Byte;
begin
   Mascara := '#$%$'#13#12;
   Str2 := '';
   PonM := 1;
   For PonS := 1 To Length(Str1) Do
     Begin
       AppendStr(Str2, Chr(Ord(Str1[PonS]) Xor Ord(Mascara[PonM])));
       Inc(PonM);
       If   PonM = Length(Mascara) Then
            PonM := 1;
     End;
   Result := Str2;
end;

Como fazer isso?

 

flws.


Viewing all articles
Browse latest Browse all 14190

Trending Articles