Click here to Skip to main content
15,903,201 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# linq working with list controls Pin
BillWoodruff28-Oct-11 14:59
professionalBillWoodruff28-Oct-11 14:59 
GeneralRe: C# linq working with list controls Pin
classy_dog28-Oct-11 17:02
classy_dog28-Oct-11 17:02 
GeneralRe: C# linq working with list controls Pin
BillWoodruff28-Oct-11 18:57
professionalBillWoodruff28-Oct-11 18:57 
QuestionWhat does this code segment mean?? Pin
Goalie3528-Oct-11 11:01
Goalie3528-Oct-11 11:01 
AnswerRe: What does this code segment mean?? PinPopular
harold aptroot28-Oct-11 11:17
harold aptroot28-Oct-11 11:17 
QuestionBitconverter.GetBytes() issue Pin
Blubbo28-Oct-11 8:16
Blubbo28-Oct-11 8:16 
AnswerRe: Bitconverter.GetBytes() issue Pin
Mark Salsbery28-Oct-11 8:36
Mark Salsbery28-Oct-11 8:36 
AnswerRe: Bitconverter.GetBytes() issue Pin
Dennis E White28-Oct-11 9:40
professionalDennis E White28-Oct-11 9:40 
when you say
Blubbo wrote:
3rd line inside bracket is what threw an exception


my guess is that you are refering to this line of code:

Int32 serialNumberInt = BitConverter.ToInt32(serialNumberBytes, 0);


BitConverter.ToInt32 is looking to read 4 bytes of information and you are only giving it 2 bytes. Try instead using BitConverter.ToInt16 which is designed for the 2 bytes that you are passing in.

BitConverter.ToInt32[^]
BitConverter.ToInt16[^]

best of luck.
as if the facebook, twitter and message boards weren't enough - blogged

AnswerRe: Bitconverter.GetBytes() issue Pin
harold aptroot28-Oct-11 9:42
harold aptroot28-Oct-11 9:42 
QuestionWriting plugin for IE Pin
johnsson7727-Oct-11 19:44
johnsson7727-Oct-11 19:44 
AnswerRe: Writing plugin for IE Pin
Richard MacCutchan27-Oct-11 23:23
mveRichard MacCutchan27-Oct-11 23:23 
QuestionWhere Did Microsoft.CSharp Go? Pin
Roger Wright27-Oct-11 18:49
professionalRoger Wright27-Oct-11 18:49 
AnswerRe: Where Did Microsoft.CSharp Go? Pin
Abhinav S27-Oct-11 19:35
Abhinav S27-Oct-11 19:35 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
Roger Wright27-Oct-11 20:07
professionalRoger Wright27-Oct-11 20:07 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
Alisaunder28-Oct-11 1:30
Alisaunder28-Oct-11 1:30 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
BobJanova28-Oct-11 2:24
BobJanova28-Oct-11 2:24 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
Alisaunder28-Oct-11 4:19
Alisaunder28-Oct-11 4:19 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
BobJanova30-Oct-11 23:50
BobJanova30-Oct-11 23:50 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
Alisaunder31-Oct-11 3:45
Alisaunder31-Oct-11 3:45 
JokeRe: Where Did Microsoft.CSharp Go? Pin
Mycroft Holmes27-Oct-11 19:44
professionalMycroft Holmes27-Oct-11 19:44 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
Roger Wright27-Oct-11 20:01
professionalRoger Wright27-Oct-11 20:01 
AnswerRe: Where Did Microsoft.CSharp Go? Pin
Bernhard Hiller27-Oct-11 21:27
Bernhard Hiller27-Oct-11 21:27 
AnswerRe: Where Did Microsoft.CSharp Go? Pin
Subin Mavunkal27-Oct-11 22:35
Subin Mavunkal27-Oct-11 22:35 
GeneralRe: Where Did Microsoft.CSharp Go? Pin
Roger Wright28-Oct-11 4:38
professionalRoger Wright28-Oct-11 4:38 
AnswerRe: Where Did Microsoft.CSharp Go? Pin
PIEBALDconsult28-Oct-11 2:58
mvePIEBALDconsult28-Oct-11 2:58 

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.