public void SetName(string name) { if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentException("Name must have a value.", "name"); } this.Name = name; }