Click here to Skip to main content
15,923,006 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reading csv file into a dataTable Pin
PIEBALDconsult17-Sep-08 5:22
mvePIEBALDconsult17-Sep-08 5:22 
GeneralRe: Reading csv file into a dataTable Pin
Muammar©17-Sep-08 13:37
Muammar©17-Sep-08 13:37 
GeneralRe: Reading csv file into a dataTable Pin
PIEBALDconsult17-Sep-08 16:44
mvePIEBALDconsult17-Sep-08 16:44 
QuestionGet a value ID from a ListBox,which is bind to a Data source. Pin
CJGun16-Sep-08 23:06
CJGun16-Sep-08 23:06 
AnswerRe: Get a value ID from a ListBox,which is bind to a Data source. Pin
CJGun17-Sep-08 19:15
CJGun17-Sep-08 19:15 
Questioncsv imports Pin
rahuladya16-Sep-08 23:05
rahuladya16-Sep-08 23:05 
AnswerRe: csv imports Pin
Giorgi Dalakishvili16-Sep-08 23:14
mentorGiorgi Dalakishvili16-Sep-08 23:14 
GeneralRe: csv imports Pin
Alan Balkany17-Sep-08 4:15
Alan Balkany17-Sep-08 4:15 
GeneralRe: csv imports Pin
Giorgi Dalakishvili17-Sep-08 4:21
mentorGiorgi Dalakishvili17-Sep-08 4:21 
AnswerRe: csv imports Pin
Mohammed Hameed17-Sep-08 1:00
professionalMohammed Hameed17-Sep-08 1:00 
GeneralRe: csv imports Pin
Ashfield17-Sep-08 1:22
Ashfield17-Sep-08 1:22 
Questionset Icon in the Add/Remove program Pin
lune1216-Sep-08 21:50
lune1216-Sep-08 21:50 
AnswerRe: set Icon in the Add/Remove program Pin
Muammar©17-Sep-08 0:53
Muammar©17-Sep-08 0:53 
Questionif a form is already opened ,new form should not been opened Pin
maifs16-Sep-08 21:46
maifs16-Sep-08 21:46 
AnswerRe: if a form is already opened ,new form should not been opened Pin
Nagy Vilmos16-Sep-08 23:43
professionalNagy Vilmos16-Sep-08 23:43 
AnswerRe: if a form is already opened ,new form should not been opened Pin
DaveyM6916-Sep-08 23:55
professionalDaveyM6916-Sep-08 23:55 
QuestionUndo Off/Disable/Suspend Pin
Khaleek Ahmad16-Sep-08 21:46
Khaleek Ahmad16-Sep-08 21:46 
Questionsystem time Pin
lankaudaranga16-Sep-08 20:56
lankaudaranga16-Sep-08 20:56 
AnswerRe: system time Pin
Giorgi Dalakishvili16-Sep-08 21:02
mentorGiorgi Dalakishvili16-Sep-08 21:02 
QuestionC++ Crc Method to C# Crc Method Pin
Programm3r16-Sep-08 20:56
Programm3r16-Sep-08 20:56 
AnswerRe: C++ Crc Method to C# Crc Method Pin
Guffa16-Sep-08 21:24
Guffa16-Sep-08 21:24 
QuestionRe: C++ Crc Method to C# Crc Method Pin
Programm3r16-Sep-08 21:40
Programm3r16-Sep-08 21:40 
AnswerRe: C++ Crc Method to C# Crc Method Pin
leppie16-Sep-08 21:48
leppie16-Sep-08 21:48 
QuestionRe: C++ Crc Method to C# Crc Method Pin
Programm3r16-Sep-08 21:52
Programm3r16-Sep-08 21:52 
AnswerRe: C++ Crc Method to C# Crc Method Pin
leppie16-Sep-08 22:09
leppie16-Sep-08 22:09 
Programm3r wrote:
Would you say that the Crc method look good after my C# interpretation?


I am not sure that it is correct, as the result (which should fit in a 16 bit number) overflowed. I have modified it slighty, best would be to test the output with the output of the native function.
static unsafe ushort crc16(char* pBuf, int Len, ushort InitialCrc)
{
  ushort crc = InitialCrc; //?

  for (int i = 0; i < Len; i++)
  {
    crc = (ushort)((crc >> 8) | (crc << 8));
    crc = (ushort)(crc ^ *pBuf);
    crc = (ushort)(crc ^ ((crc & 0xff) >> 4));
    crc = (ushort)(crc ^ (crc << 12));
    crc = (ushort)(crc ^ ((crc & 0xff) << 5));
    pBuf++;
  }

  return crc;
}


xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4a out now (29 May 2008)

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.