ToString()

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: [Yosi] (Yosi_at_discussions.microsoft.com)
Date: 06/14/04


Date: Mon, 14 Jun 2004 00:57:01 -0700

in C/C++ I can use printf("%0.2X",t) to add mack the output wit to parameter,
for example if t = 0xA after printf I will get 0x0A.
How can I do that in C#.
I want to print a hexa number but to be 4 carecters 0x000A insted of 0xA.
and also I want to print a bin number but to be 8 carecters 00001010 insted of 0xA = (0xA).ToString("B") ???????.



Relevant Pages

  • Printf Issues
    ... I'm pretty new to C/C++, and I was wondering how to correctly use ... printf and then create a new line. ... in cout? ... Hellow World!How are you? ...
    (comp.lang.cpp)
  • Re: Printf Issues
    ... >> printf and then create a new line. ... >> Hellow World!How are you? ... '\n' is the newline character in c/c++ ...
    (comp.lang.cpp)