c# how to insert &nbsp using padleft

M

mbalam

the following code
int j = 1;
string one = j.ToString();
Debug.WriteLine (one.PadLeft(2,'_'));
writes
_1

I want &nbsp1 as in html "white space" 1
for populating a drop down list

How dow I pad a 1 with white space in C#?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,077
Messages
2,570,569
Members
47,206
Latest member
MalorieSte

Latest Threads

Top