Use UInt16.MaxValue instead of ushort.MaxValue and a static readonly string with String.Format for the error message.