Horje
add leading zeroes in c# Code Example
add leading zeroes in c#
i.ToString().PadLeft(4, '0') - okay, but doesn't work for negative numbers
i.ToString("0000"); - explicit form
i.ToString("D4"); - short form format specifier
$"{i:0000}"; - string interpolation (C# 6.0+)




Csharp

Related
get all files in all subdirectories c# Code Example get all files in all subdirectories c# Code Example
c# 2-dimensional array sort Code Example c# 2-dimensional array sort Code Example
Error: EACCES: permission denied, access '/usr/local/lib/node_modules' Code Example Error: EACCES: permission denied, access '/usr/local/lib/node_modules' Code Example
How to copy a file in C# Code Example How to copy a file in C# Code Example
.net core partial view with model Code Example .net core partial view with model Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12