private string NextId() { while (true) { string s = "Re" + relationshipId.ToString(); if (!RelationshipExists(s)) return s; relationshipId++; } }