-
-
Save fitomad/e68f436e7eee6ba8b4de715e9b2f3185 to your computer and use it in GitHub Desktop.
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