❔ force a ushort value?
if i type for example
var num = 25L;
i am forcing a long value (int64)
how can i force a ushort in the same way?
11 Replies
By defining it explicity as
ushort
Can't find anything in the docs, oddly enough, but found this: https://www.c-sharpcorner.com/article/data-type-suffixes-in-c-sharp/
Would
us
work...?thinker227#5176
REPL Result: Failure
Exception: CompilationErrorException
Compile: 323.907ms | Execution: 0.000ms | React with ❌ to remove this embed.
huh, thought that worked
Angius#1586
REPL Result: Success
Result: ulong
Compile: 288.057ms | Execution: 22.866ms | React with ❌ to remove this embed.
Works for
ulong
s
Not for ushort
s thooh well i endedup doing (ushort)25
Or just use
ushort
instead of var
...?short and byte don't have suffixes
they used to, actually
1y
for byte (???????????) and 1s
for shortWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.