xxxxxxxxxx
// IntPtr aren't directly usable for arithmetic.
IntPtr a = (IntPtr)5;
IntPtr b = (IntPtr)6;
IntPtr c = new IntPtr((long)a + (long)b);
// nint/nuint can be used for arithmetic.
nint i = 5;
nint j = 6;
nint k = i + j;
// cast required: int-size may be smaller.
int y = (int)i;
xxxxxxxxxx
using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}