By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,635 Members | 2,085 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,635 IT Pros & Developers. It's quick & easy.

Implicity convertion C++ -> C#

P: n/a
Hi,
I'm translating some code from C++ to C#,
but I don't know how to change the code below to get it working under C#
...., I've tried explicity convertion, but without any results :(
Please help....

int b = -1;
uint a,c = 0;

Encoding encodingAscii = Encoding.GetEncoding(1250);
Encoding encodingUnicode = Encoding.Unicode;

unchecked
{
for (int i=0;i<multiParam.Length;i++)
{
byte[] unicodeBytes = encodingUnicode.GetBytes(multiParam[i]);
byte[] asciiBytes =
Encoding.Convert(encodingUnicode,encodingAscii,uni codeBytes);

for (int j=0;j<asciiBytes.Length;j++)
{
c = asciiBytes[j];

//the problem starts here...

a = (c ^ b) + (c << 8);
b = (a >> 24) | (a << 8);
}
}
}

Regards.

Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.