c# - Escape zero character in number format -


is there way escape 0 -character character in c#, when using integer's .tostring() -method?

example code:

(112233).tostring("zerohereaschar:_0_numberhere:0")

as result string:

zerohereaschar:_0_numberhere:112233,

but i'm getting:

zerohereaschar:11223_numberhere:3

you can use backslash escape character:

(112233).tostring("zerohereaschar:_\\0_numberhere:0"); 

or verbatim string literal:

(112233).tostring(@"zerohereaschar:_\0_numberhere:0"); 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -