String.Format function

  • Thread starter Thread starter winthux
  • Start date Start date
W

winthux

how should look string format that the String.Format() return result the
same like function sprintf("%08x%08x", a,b)??
 
winthux said:
how should look string format that the String.Format() return result the
same like function sprintf("%08x%08x", a,b)??

I can't remember much about C style format strings, but I believe what
you're after is:

String x = String.Format("{0:x8}{1:x8}", a, b);
 
Back
Top