// constructor with all the required fields public PollType(PollTypeType thisType, bool isHidden, string thisTitle, string thisLevels, string thisDescription) { SetType(thisType); SetHidden(isHidden); title = thisTitle; levels = thisLevels; description = thisDescription; }
// helper methods to set properties that have the "specified" extra fields (wierdness of XMLSerialization) public void SetType(PollTypeType thisType) { this.type = thisType; this.typeSpecified = true; }