private uint ConvertToUint32(long l) { while (l > UInt32.MaxValue) { l -= UInt32.MaxValue; } return Convert.ToUInt32(l); }