vb.net - perfecnt counter

hello there,
I would like to create a percent counter..
I have two counter that check for file size. if file size is bigger then 1MB then
Big.Text += 1
if file size is smaller than 1MB then
Small.Text += 1
how can I have a percentage that show like %95 etc.. ?
Who is Participating?
Paul MacDonaldDirector, Information SystemsCommented:
This will depend on what the number is a percentage of.  I presume the ratio involves Big.text and Small.text, but are you looking for those to be percentages of each other, percentages of some total value (total number of files, total file size, etc), or something else.  

It's also possible you're asking how to show Big.text and Small.text as percentage values.  In that case what you want is the FormatPercent function, but you may want to divide your numbers by 100 first.

This question can be answered better if it's stated more clearly.
AndyAinscowFreelance programmer / ConsultantCommented:
VB isn't my main language so this is air code

dim i as integer, s as string
i = 95
s = "%" + i.ToString()

should result in s being %95
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.