Convert a function's Php code to C # .net

Function getCRC16($value) {

$polinomio = 0x1021;

$resultado = 0xFFFF;


if (($length = strlen($value)) > 0) {

for ($offset = 0; $offset < $length; $offset++) {

$resultado ^= (ord($value[$offset]) << 8);

for ($bitwise = 0; $bitwise < 8; $bitwise++) {

if (($resultado <<= 1) & 0x10000) $resultado ^= $polinomio;

$resultado &= 0xFFFF;




return strtoupper(dechex($resultado));


This function reproduces these results:

echo getCRC16('261cca7aa11aabe18c128fb9c3b0d992').'</Br>'; //Result C810

echo getCRC16('4ef3e8c323abb5938ff5d9522a28bc14').'</Br>'; //Result 878E

echo getCRC16('d32eeb8baab8af828c2ca6f044d36c5c').'</Br>'; //Result 5ACF

echo getCRC16('99981123fcc3021fef7a955659404ce4').'</Br>'; //Result 89BB

echo getCRC16('a536f162f1775f2d5ed6336c9b3524dc').'</br>'; //Result 2EAD

Habilidades: Programação C#, PHP, .NET

Veja mais: convert flv mp3 php code script, convert php code dot net, convert avi ffmpeg php code examples, convert xls mysql php code, convert php code vb net online, php code asp net conversion, php code vb net converter, source code vb net function, upload convert videos flv php code, convert docx pdf php code, convert doc pdf php code, convert vba excel addin code vba net excel, convert html to pdf in c# net free dll, calling javascript function from php code, convert text to php code, convert string to morse code c++

Acerca do Empregador:
( 1 comentário ) ARACAJU, Brazil

ID do Projeto: #29391334

Concedido a:


Dear Sir, I will be glad to help you port your PHP code to C#. I have good experience with both languages. I also speak Portuguese if that would be easier for you. Thank you for considering my proposal. Best regards Mais

$20 USD em 1 dia
(10 Comentários)

2 freelancers estão ofertando em média $25 nesse trabalho


Hi. I have written many automation .NET C# apps. Ready to write your project. Will complete within some hours

$30 USD em 1 dia
(46 Comentários)