Binary/Octal format specifier #75769
Replies: 4 comments 6 replies
-
This is already supported for binary. can use |
Beta Was this translation helpful? Give feedback.
-
Do you have a scenario for Octal in particular? One of the few places I can think of it being used is Linux file permissions.
Some languages use |
Beta Was this translation helpful? Give feedback.
-
Moving to runtime as this was a request about format-specifiers. Sorry for hte confusion. We thought you were asking for C# literal support here. |
Beta Was this translation helpful? Give feedback.
-
@anthony-sv Please create an issue in this repo to if you want to propose the format specifier. You could probably use the API proposal issue template although its not really API. I'm guessing it might go to API review. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I think I'd be cool and easy to integrate to the language a way to specify Binary or Octal format Specifier, since we can with Hexadecimal, from Standard numeric format specifiers B/b and O/o are free so would have a problem, and we currently have easy way to convert to string with Convert.ToString(value, 2); for binary or from "any" base (more like 2,8,10,16) Convert.ToString(Convert.ToInt32(number, fromBase), toBase);, so we have the way to do this but if it's already working for Hex I don't see why limit it to 1 base, well technically 2 because base 10 is default.
Beta Was this translation helpful? Give feedback.
All reactions