Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
Questionhow to string to binary Pin
tai-fun26-Mar-10 4:56
tai-fun26-Mar-10 4:56 
AnswerRe: how to string to binary Pin
Richard MacCutchan26-Mar-10 5:00
mveRichard MacCutchan26-Mar-10 5:00 
AnswerRe: how to string to binary Pin
OriginalGriff26-Mar-10 5:14
mveOriginalGriff26-Mar-10 5:14 
AnswerRe: how to string to binary Pin
tai-fun26-Mar-10 5:17
tai-fun26-Mar-10 5:17 
GeneralRe: how to string to binary Pin
harold aptroot26-Mar-10 5:59
harold aptroot26-Mar-10 5:59 
AnswerRe: how to string to binary Pin
Luc Pattyn26-Mar-10 5:21
sitebuilderLuc Pattyn26-Mar-10 5:21 
GeneralRe: how to string to binary Pin
tai-fun26-Mar-10 5:51
tai-fun26-Mar-10 5:51 
GeneralRe: how to string to binary Pin
Luc Pattyn26-Mar-10 6:04
sitebuilderLuc Pattyn26-Mar-10 6:04 
sure, when you mean "eight" do you write "0000000008" or "8"? it isn't because a 32-bit integer could hold up to 10 digits that you must prefix all those zeroes, is it? Not in decimal, not in hex, not in octal, not in binary.

If you want something prefixed, use string.PadLeft()

FYI: There is a shortcut for hexadecimal, the format specifier "X4" enforces at least four digits, prefixing zeroes as necessary. However there is no binary or octal format specifier in .NET

Smile | :)

GeneralRe: how to string to binary Pin
OriginalGriff26-Mar-10 6:00
mveOriginalGriff26-Mar-10 6:00 
GeneralRe: how to string to binary Pin
tai-fun26-Mar-10 6:06
tai-fun26-Mar-10 6:06 
GeneralRe: how to string to binary Pin
Luc Pattyn26-Mar-10 6:32
sitebuilderLuc Pattyn26-Mar-10 6:32 
GeneralRe: how to string to binary Pin
Luc Pattyn26-Mar-10 6:36
sitebuilderLuc Pattyn26-Mar-10 6:36 
GeneralRe: how to string to binary Pin
OriginalGriff26-Mar-10 6:48
mveOriginalGriff26-Mar-10 6:48 
GeneralRe: how to string to binary Pin
Luc Pattyn26-Mar-10 6:56
sitebuilderLuc Pattyn26-Mar-10 6:56 
GeneralRe: how to string to binary Pin
OriginalGriff26-Mar-10 11:20
mveOriginalGriff26-Mar-10 11:20 
GeneralRe: how to string to binary Pin
Luc Pattyn26-Mar-10 11:25
sitebuilderLuc Pattyn26-Mar-10 11:25 
GeneralRe: how to string to binary Pin
OriginalGriff26-Mar-10 22:25
mveOriginalGriff26-Mar-10 22:25 
GeneralRe: how to string to binary Pin
T M Gray26-Mar-10 11:51
T M Gray26-Mar-10 11:51 
GeneralRe: how to string to binary Pin
Luc Pattyn26-Mar-10 12:00
sitebuilderLuc Pattyn26-Mar-10 12:00 
AnswerRe: how to string to binary Pin
tai-fun26-Mar-10 6:37
tai-fun26-Mar-10 6:37 
AnswerRe: how to string to binary Pin
DaveyM6926-Mar-10 6:49
professionalDaveyM6926-Mar-10 6:49 
QuestionNot able to assign the picture to toolbar item. Pin
SRKSHOME26-Mar-10 2:16
SRKSHOME26-Mar-10 2:16 
AnswerRe: Not able to assign the picture to toolbar item. Pin
Ravi Bhavnani26-Mar-10 2:57
professionalRavi Bhavnani26-Mar-10 2:57 
GeneralRe: Not able to assign the picture to toolbar item. Pin
SRKSHOME26-Mar-10 3:49
SRKSHOME26-Mar-10 3:49 
QuestionHow to get the execution folder if the file executed is in another folder? Pin
Ted On The Net26-Mar-10 1:31
Ted On The Net26-Mar-10 1: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.