Click here to Skip to main content
15,887,952 members
Home / Discussions / C#
   

C#

 
AnswerRe: Algorithm Question - Urgent Help Needed Pin
J4amieC9-Nov-05 0:19
J4amieC9-Nov-05 0:19 
AnswerRe: Algorithm Question - Urgent Help Needed Pin
HymanRoth9-Nov-05 0:43
HymanRoth9-Nov-05 0:43 
GeneralRe: Algorithm Question - Urgent Help Needed Pin
allenmpcx9-Nov-05 0:47
allenmpcx9-Nov-05 0:47 
AnswerRe: Algorithm Question - Urgent Help Needed Pin
leppie9-Nov-05 6:58
leppie9-Nov-05 6:58 
QuestionSource File: c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config Line: 198 Pin
israfel8-Nov-05 23:02
israfel8-Nov-05 23:02 
QuestionUse of Datagrid for non database app Pin
ratinahat0018-Nov-05 22:41
ratinahat0018-Nov-05 22:41 
AnswerRe: Use of Datagrid for non database app Pin
Rody van Sambeek9-Nov-05 13:07
Rody van Sambeek9-Nov-05 13:07 
QuestionCRC-16 Convert to C vb.Net Pin
RichardBerry8-Nov-05 22:22
RichardBerry8-Nov-05 22:22 
Hi

Please could someone help me to convert the following to Visual Basic.. or alternatively post a table driven version

It is a CRC16 algorithm using the polynomial (x16 + x15 + x2 + 1) used for very short strings.

I think (not sure) a test string of "123456789" should generate a hex checksum of: BD3B

Tks

Richard

static unsigned BitsSet (unsigned char ch)
{
unsigned n;
n = 0;
while (ch)
{
n += (ch & 1);
ch >>= 1;
}
return(n);
}

unsigned CRCof (const char *message, unsigned len)
{
unsigned i;
unsigned crc;
unsigned char k;

crc = 0;
for (i=0; i<len; i++)
{
k = (unsigned char)(message[i]) ^ crc;
crc = (crc / 256) ^ (k*128) ^(k*64);
if ((BitsSet(k) & 1) != 0)
crc ^= 0xC001;
}
return(crc);
}


QuestionRetreive file list from remote server using ftp - Error 226 - Urgent help required Pin
SheenSylesh8-Nov-05 22:03
SheenSylesh8-Nov-05 22:03 
QuestionHow to Bind ComboBox1 with DataSet1 ? Pin
majidbhutta8-Nov-05 21:54
majidbhutta8-Nov-05 21:54 
AnswerRe: How to Bind ComboBox1 with DataSet1 ? Pin
Susan Hernandez9-Nov-05 14:42
Susan Hernandez9-Nov-05 14:42 
AnswerRe: How to Bind ComboBox1 with DataSet1 ? Pin
n10sive10-Nov-05 12:04
n10sive10-Nov-05 12:04 
QuestionParent Form Child Form Problem Pin
ekynox8-Nov-05 20:37
ekynox8-Nov-05 20:37 
AnswerRe: Parent Form Child Form Problem Pin
hga_gi8-Nov-05 23:05
hga_gi8-Nov-05 23:05 
GeneralRe: Parent Form Child Form Problem Pin
ekynox8-Nov-05 23:36
ekynox8-Nov-05 23:36 
Questionhow to add module in c#.net? Pin
sarayumadhavan8-Nov-05 20:00
sarayumadhavan8-Nov-05 20:00 
AnswerRe: how to add module in c#.net? Pin
FriendlyFiend8-Nov-05 22:50
FriendlyFiend8-Nov-05 22:50 
QuestionRemoving Cookies and Temp Internet Files Pin
sonicsqwirl8-Nov-05 19:43
sonicsqwirl8-Nov-05 19:43 
QuestionError.....Net Remoting Pin
deep78-Nov-05 19:02
deep78-Nov-05 19:02 
QuestionCalling a C# COM Object from VC++ 6.0 Pin
E6AD8-Nov-05 17:16
E6AD8-Nov-05 17:16 
AnswerRe: Calling a C# COM Object from VC++ 6.0 Pin
Christian Graus8-Nov-05 17:36
protectorChristian Graus8-Nov-05 17:36 
GeneralRe: Calling a C# COM Object from VC++ 6.0 Pin
E6AD8-Nov-05 17:50
E6AD8-Nov-05 17:50 
QuestionShort Cuts Pin
picasso28-Nov-05 17:08
picasso28-Nov-05 17:08 
AnswerRe: Short Cuts Pin
Christian Graus8-Nov-05 17:15
protectorChristian Graus8-Nov-05 17:15 
QuestionHow to build a DLL in C#? Pin
E6AD8-Nov-05 16:31
E6AD8-Nov-05 16:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.