Hello everybody,
well I used the approch suggested in this post (and in those sent by
J. Frase et al), and it works fine.
I was expecting something  similar to the %8.8x forhex number in C, so
I didn't think about acting directly on string.
Thanks for your really useful help
Giovanni

On 6 Set, 12:24, Samresh <[email protected]> wrote:
> Why dont you use something like this-
> for 8 bit numbers:
>
> textBoxSlot1.Text = Convert.ToString(a_high, 2).PadLeft(8, '0') +
>                                        Convert.ToString(a_low,
> 2).PadLeft(8, '0')
>
> On Sep 4, 6:44 pm, Giox <[email protected]> wrote:
>
>
>
> > Good morning, I have a problem that I think is quite simple, but I'm
> > not able to fix it by my self.
>
> > I have two eight bit numbers, suppose:
>
> > a_low = 3
> > a_high = 2
>
> > I would like to create a string like the following one:
>
> > 00000010 00000011
>
> > But I'm not able to force the left padding of the number.
> > I'm acting as follows:
>
> > textBoxSlot1->Text = Convert::ToString(a_high ,2)+
> >                                 Convert::ToString(a_low ,2);
>
> > However by this way I don't get the left padding with 0.
> > I tried using String::Format, but I don't know how.
> > Any help will be apreciated

Reply via email to