Last active
January 26, 2016 15:08
-
-
Save donpandix/d2f6b20d1952a0e833c6 to your computer and use it in GitHub Desktop.
Clase sencilla en Swift, implementación para ver el scope de las propiedades
This file contains hidden or 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
class MyClass { | |
let nombre:String; | |
init ( nombre:String ) { | |
self.nombre = nombre; | |
} | |
} | |
// Nueva instancia de la clase MyClass | |
let yoMismo = MyClass( nombre:"Cesar Gonzalez" ); | |
// Imprime el nombre seteado | |
println( "Mi nombre es : \(yoMismo.nombre)" ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment