Click here to Skip to main content
15,908,843 members
Home / Discussions / C#
   

C#

 
QuestionPlease I need help on this because it's not filling the form Pin
relicon15-Apr-12 15:39
relicon15-Apr-12 15:39 
AnswerRe: Please I need help on this because it's not filling the form Pin
relicon15-Apr-12 15:40
relicon15-Apr-12 15:40 
GeneralRe: Please I need help on this because it's not filling the form Pin
BobJanova15-Apr-12 23:35
BobJanova15-Apr-12 23:35 
GeneralRe: Please I need help on this because it's not filling the form Pin
Member 281270416-Apr-12 0:24
professionalMember 281270416-Apr-12 0:24 
GeneralRe: Please I need help on this because it's not filling the form Pin
Pete O'Hanlon16-Apr-12 0:39
mvePete O'Hanlon16-Apr-12 0:39 
QuestionCRC-ITU calculation in c# Pin
Hilman Anshori15-Apr-12 14:25
Hilman Anshori15-Apr-12 14:25 
AnswerRe: CRC-ITU calculation in c# Pin
Wes Aday15-Apr-12 16:54
professionalWes Aday15-Apr-12 16:54 
AnswerRe: CRC-ITU calculation in c# Pin
BobJanova15-Apr-12 23:42
BobJanova15-Apr-12 23:42 
This is not even hard, just some type conversions (U16->ushort, U8->byte) and changing pointer access to array access:

    // calculate 16 bits CRC of the given length data.
ushort GetCrc16(byte[] pData)
{
 ushort fcs = 0xffff; // Initialize
 
 for(int i = 0; i < pData.Length; i++){
  fcs = (fcs >> 8) ^ crctab16[(fcs ^ pData[i]) & 0xff];
 }
 return ~fcs; // Negate
}
    
// Check whether the 16 bits CRC of the given length data is right.
bool IsCrc16Good(byte[] pData)
{
 return GetCrc16(pData) == 0x0f47; // ~F0B8
}


You might need to cast to get a ushort back out of the shift and XOR, though.
QuestionDispose groupbox Pin
Ronny Portier15-Apr-12 3:06
Ronny Portier15-Apr-12 3:06 
AnswerRe: Dispose groupbox Pin
Luc Pattyn15-Apr-12 3:15
sitebuilderLuc Pattyn15-Apr-12 3:15 
GeneralRe: Dispose groupbox Pin
Ronny Portier15-Apr-12 5:21
Ronny Portier15-Apr-12 5:21 
AnswerRe: Dispose groupbox Pin
Luc Pattyn15-Apr-12 5:44
sitebuilderLuc Pattyn15-Apr-12 5:44 
GeneralRe: Dispose groupbox Pin
phil.o15-Apr-12 5:32
professionalphil.o15-Apr-12 5:32 
AnswerRe: Dispose groupbox Pin
DaveyM6915-Apr-12 5:49
professionalDaveyM6915-Apr-12 5:49 
AnswerRe: Dispose groupbox Pin
Abhinav S15-Apr-12 6:05
Abhinav S15-Apr-12 6:05 
AnswerRe: Dispose groupbox Pin
Luc Pattyn15-Apr-12 6:18
sitebuilderLuc Pattyn15-Apr-12 6:18 
AnswerRe: Dispose groupbox Pin
Abhinav S15-Apr-12 6:51
Abhinav S15-Apr-12 6:51 
AnswerRe: Dispose groupbox Pin
Luc Pattyn15-Apr-12 6:58
sitebuilderLuc Pattyn15-Apr-12 6:58 
GeneralRe: Dispose groupbox Pin
Abhinav S15-Apr-12 7:23
Abhinav S15-Apr-12 7:23 
AnswerRe: Dispose groupbox Pin
V.15-Apr-12 21:56
professionalV.15-Apr-12 21:56 
AnswerRe: Dispose groupbox Pin
Pete O'Hanlon15-Apr-12 23:45
mvePete O'Hanlon15-Apr-12 23:45 
Questionproblem in restoring mysql database Pin
altafmohd14-Apr-12 21:35
altafmohd14-Apr-12 21:35 
AnswerRe: problem in restoring mysql database Pin
OriginalGriff14-Apr-12 22:30
mveOriginalGriff14-Apr-12 22:30 
GeneralRe: problem in restoring mysql database Pin
altafmohd14-Apr-12 22:41
altafmohd14-Apr-12 22:41 
QuestionRe: problem in restoring mysql database Pin
Eddy Vluggen15-Apr-12 0:35
professionalEddy Vluggen15-Apr-12 0:35 

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.