This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum DatosPersonales: CaseIterable { | |
case nombre | |
case apellidos | |
case direccion | |
case telefonoMovil | |
case telefonoFijo | |
} | |
print("Puede establecer \(DatosPersonales.allCases.count) campos") | |
for datoPersonal in DatosPersonales.allCases | |
{ | |
print(datoPersonal) | |
} | |
/* | |
apellidos | |
direccion | |
telefonoMovil | |
telefonoFijo | |
*/ | |
let descripcion = DatosPersonales.allCases.map({ "\($0)" }).joined(separator: ", ") | |
print(descripcion) | |
/* | |
nombre, apellidos, direccion, telefonoMovil, telefonoFijo | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment