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

C#

 
GeneralRe: c# binary to decimal code -new- Pin
Peter_in_27807-Oct-11 11:49
professionalPeter_in_27807-Oct-11 11:49 
GeneralRe: c# binary to decimal code -new- Pin
KP Lee10-Oct-11 10:57
KP Lee10-Oct-11 10:57 
GeneralRe: c# binary to decimal code -new- Pin
Peter_in_278010-Oct-11 14:42
professionalPeter_in_278010-Oct-11 14:42 
GeneralRe: c# binary to decimal code -new- Pin
KP Lee10-Oct-11 15:05
KP Lee10-Oct-11 15:05 
NewsRe: c# binary to decimal code -new- Pin
Perić Željko7-Oct-11 7:56
professionalPerić Željko7-Oct-11 7:56 
AnswerRe: c# binary to decimal code -new- Pin
KP Lee10-Oct-11 14:51
KP Lee10-Oct-11 14:51 
GeneralRe: c# binary to decimal code -new- Pin
Peter_in_278011-Oct-11 12:41
professionalPeter_in_278011-Oct-11 12:41 
GeneralRe: c# binary to decimal code -new- Pin
KP Lee11-Oct-11 13:55
KP Lee11-Oct-11 13:55 
Peter_in_2780 wrote:
Also, have a look at this thread[^].

"this thread" got me here in the first place. Smile | :)
I know this is inefficient, but as a learning tool, this makes a good example of how signed integers work. (and maybe even let him learn how to code a little more efficiently.) I think his original example would say "1xyz1" was 33. (I don't remember his original code exactly, so I'm going from what I remember thinking of it.)

I actually learned something. My version has a bug in it. My "bit *= 2;" (my expectation and I forgot what I used for "bit") should have blown up when I tried to make it 2^32 power, instead it made it -2^31 (int.MinValue). To fix my bug, add "if (i > 0) " before that statement and take out the prior "if ...Length == 32" logic.
QuestionGood reporting and database tools for C# ? Pin
Stan Moong5-Oct-11 18:22
Stan Moong5-Oct-11 18:22 
AnswerRe: Good reporting and database tools for C# ? Pin
Eddy Vluggen6-Oct-11 6:55
professionalEddy Vluggen6-Oct-11 6:55 
GeneralRe: Good reporting and database tools for C# ? Pin
Stan Moong6-Oct-11 14:31
Stan Moong6-Oct-11 14:31 
QuestionCall Methods Across ActiveSync Connection Pin
namelkcip5-Oct-11 17:02
namelkcip5-Oct-11 17:02 
QuestionBasic c# question Pin
SFORavi5-Oct-11 13:22
SFORavi5-Oct-11 13:22 
AnswerRe: Basic c# question Pin
BillWoodruff5-Oct-11 14:08
professionalBillWoodruff5-Oct-11 14:08 
QuestionGetting system specs without WMI Pin
CCodeNewbie5-Oct-11 9:30
CCodeNewbie5-Oct-11 9:30 
AnswerRe: Getting system specs without WMI Pin
Luc Pattyn5-Oct-11 10:26
sitebuilderLuc Pattyn5-Oct-11 10:26 
GeneralRe: Getting system specs without WMI Pin
CCodeNewbie5-Oct-11 11:03
CCodeNewbie5-Oct-11 11:03 
GeneralRe: Getting system specs without WMI Pin
Dave Kreskowiak5-Oct-11 15:44
mveDave Kreskowiak5-Oct-11 15:44 
GeneralRe: Getting system specs without WMI Pin
CCodeNewbie5-Oct-11 19:25
CCodeNewbie5-Oct-11 19:25 
GeneralRe: Getting system specs without WMI Pin
Dave Kreskowiak6-Oct-11 3:39
mveDave Kreskowiak6-Oct-11 3:39 
QuestionFor Remote Connection -SQL Server Pin
Paramu19735-Oct-11 4:21
Paramu19735-Oct-11 4:21 
AnswerRe: For Remote Connection -SQL Server Pin
PIEBALDconsult5-Oct-11 5:22
mvePIEBALDconsult5-Oct-11 5:22 
GeneralRe: For Remote Connection -SQL Server Pin
Paramu19735-Oct-11 19:30
Paramu19735-Oct-11 19:30 
QuestionAccessing the controls in selected area Pin
teknolog1235-Oct-11 3:59
teknolog1235-Oct-11 3:59 
AnswerRe: Accessing the controls in selected area PinPopular
Pete O'Hanlon5-Oct-11 4:16
mvePete O'Hanlon5-Oct-11 4:16 

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.