Skip to content

Commit 9787451

Browse files
authored
docs(cs0675): updated sample (#26526)
1 parent e3c4063 commit 9787451

File tree

1 file changed

+3
-3
lines changed
  • docs/csharp/language-reference/compiler-messages

1 file changed

+3
-3
lines changed

docs/csharp/language-reference/compiler-messages/cs0675.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ public class sign
2626
public static void Main()
2727
{
2828
int hi = 1;
29-
int lo = 1;
30-
long value = (((long)hi) << 32) | lo; // CS0675
29+
int lo = -1;
30+
long value = (((long)hi) << 32) | lo; // CS0675, value contains -1 (0xffffffff_ffffffff)
3131
// try the following line instead
32-
// long value = (((long)hi) << 32) | ((uint)lo); // correct
32+
// long value = (((long)hi) << 32) | ((uint)lo); // correct, value contains 8589934591 (0x00000001_ffffffff)
3333
}
3434
}
3535
```

0 commit comments

Comments
 (0)