Solved

Get Count in a variable with 5 digits always

Posted on 2016-11-30
1
8 Views
Last Modified: 2016-11-30
Hi Experts,
    I am looking for a function to get following   in VB.NET

        I have to get a value to a  string variable   in a loop

      For Myint =  1 to 10000
           MyString  should get value from MyInt
      Next

       But the rule is , it should always have 5 digits  . That is ,
            when  Myint = 1 Mystring should be "00001"  
                        Myint = 100 Mystring should be "00100"
               ...
0
Comment
Question by:Sam OZ
1 Comment
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 500 total points
Comment Utility
try:
MyString = Myint.ToString("00000")

Open in new window

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now