// without using sizeof
byte[] dataBytes = BitConverter.GetBytes(x);
int d = dataBytes.Length;