public virtual string GetHostName() { if (!ServerName.IsCorrectType(0, this.mName)) { throw new InvalidOperationException("'name' is not a HostName string"); } return((string)this.mName); }
public ServerName(byte nameType, object name) { if (!ServerName.IsCorrectType(nameType, name)) { throw new ArgumentException("not an instance of the correct type", "name"); } this.mNameType = nameType; this.mName = name; }