The ASP. NET fixed function bit is full of 0 (solution, demo sample)!

Source: Internet
Author: User

The ASP. NET fixed function bit is full of 0 (resolved. Demo sample)!

In the development, where the number of implementations appeared 8 figures. However, you need to use 0 thicken. For example: 123, Rep: 0000123.

The true proportions are as follows:


     Decimal AAA = 123;    Numeric     string bbb =  AAA. ToString ();   Convert to character      BBB = bbb. PadLeft (7, ' 0 ');     Total 7 bits. Before using 0      Response.Write (BBB);

Decimal AAA = 123; Numeric type

String bbb = AAA.   ToString (); Convert to Character
BBB = bbb.     PadLeft (7, ' 0 '); Total 7 bits, before with 0

Response.Write (BBB);



Copyright notice: This article Bo Master original article. Blog, not reproduced without consent.

The ASP. NET fixed function bit is full of 0 (solution, demo sample)!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.