Closed salpelter closed 2 months ago
Learn Build status updates of commit 76fa54e:
File | Status | Preview URL | Details |
---|---|---|---|
snippets/csharp/System/Object/GetType/GetTypeEx2.cs | :white_check_mark:Succeeded | View |
For more details, please refer to the build report.
For any questions, please:
Hi @salpelter
I'm closing this because the original code is correct. The declaration casts the type of 10653
to a long
. Therefore, it's type is long
, even though its value is small enough for a 32 bit int
. See sharplab
Hi @salpelter
I'm closing this because the original code is correct. The declaration casts the type of
10653
to along
. Therefore, it's type islong
, even though its value is small enough for a 32 bitint
. See sharplab
I don't understand what you're trying to say, to be honest. I never said that the number isn't of type long
. And I agree that the number is small enough for a 32-bit integer, but since it was cast to long
, that makes it 64-bit, doesn't it?
I followed your sharplab link and it only confirmed that I was right. It literally displayed "10653 is a 64-bit integer," as I expected. Am I missing something? It didn't even cross my mind at the time of making the pull request that my edit was in any way incorrect. Could you please explain what's wrong?
Learn Build status updates of commit 76fa54e:
File | Status | Preview URL | Details |
---|---|---|---|
snippets/csharp/System/Object/GetType/GetTypeEx2.cs | :white_check_mark:Succeeded | View |
For more details, please refer to the build report.
For any questions, please:
Summary
It's basically a code example that has a wrong output comment in the end. The number in question (10653) is actually of type
long
, which makes it asigned 64-bit integer
, not 32.