19 April 2014

C# syntax to Generate Sequence number with Prefix

int sequenceNumber = 5;
string id = string.Format("PT{0}", sequenceNumber.ToString().PadLeft(13, '0'));

OUTPUT

PT0000000000001 , PT0000000000002 , PT0000000000003 ,PT0000000000004 ,PT0000000000005


No comments:

Post a Comment