public string Serialize() { if (RelType == RelationshipType.Custom && string.IsNullOrWhiteSpace(CustomRelType)) { throw new ArgumentException("Invalid custom relationship type! Type needs to be custom as well when custom type name is explicitly set!"); } return($"RELTYPE={ (RelType == RelationshipType.Custom ? CustomRelType : RelType.ToString().ToUpper()) }"); }