Create a custom string c# -


I have the numeric ID of the integer type. I want to add that integer type of value to 00000 and it's the string type variable Want to join Recognize my integer variable value 1 After adding the variable it should look like 00001. And I want to add "string" to the string and then change the whole thing in the string variable like "Added 00001" as another example if my integer value is 111 then it's finally added "00111" Should look. Another example is integer variable = 1234. The last string should be "Added 101234". how to do this...? An example of how to do this .. or any tutorial how to do such a thing, really good thanks in advance

You must use the short format format specification of the toasting method. In the example below, D5 indicates that integer 111 should be converted into a string with a padded zero length of 5 characters, e.g. 00111.

  int i = 111; String s = "added"; Var s = s + i.ToString ("D5"); // s = "added 00111"    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -