I had to deal with code that computes with a large number, for example.
long foo = 6235449243234;
It is hard to say what the order of magnitude is. I would like to write it
long foo = 6_235_449_243_234;
or
long foo = @6 235 449 243 234;
But C # does not have these features. How to make numeric literals more readable?
To comment
long foo = 6235449243234;
Convert it from string
long foo = LiteralConverter.toLong(@"6_235_449_243_234"); int mask = LiteralConverter.toInt("b0111_0000_0100_0000");
Any other options?
source share