Created
May 6, 2014 13:11
-
-
Save valdiney/9f539a7f6ca1cc83e07a to your computer and use it in GitHub Desktop.
Classe Telefone, estudo simples
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
using System; | |
class Inicio | |
{ | |
static void Main(string[] args) | |
{ | |
MinhaClasse novo = new MinhaClasse(); | |
Console.ReadKey(); | |
} | |
} |
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
class MinhaClasse | |
{ | |
public MinhaClasse() | |
{ | |
Telefone meuTelefone = new Telefone("Preto", "Android 4.1.1"); | |
meuTelefone.Ligar("9711-4457"); | |
} | |
} | |
class Telefone | |
{ | |
private string cor; | |
private string so; | |
public Telefone(string cor, string so) | |
{ | |
this.cor = cor; | |
this.so = so; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment