Alekstim
Alekstim

Reputation: 462

C++ format placeholders equivalent in c#

What is format placeholder equivalent in c# (string.Format("{0:??}") where '??' is placeholder which I asked) for "%06d"?

printf("%06d",number);

Upvotes: 1

Views: 910

Answers (1)

saeed
saeed

Reputation: 2497

This might help you.

string st = string.Format("{0:000000} and {1:000000}", 123 ,456);
//st => 000123 and 000456

Upvotes: 3

Related Questions