Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Classe Telefone, estudo simples
using System;
class Inicio
{
static void Main(string[] args)
{
MinhaClasse novo = new MinhaClasse();
Console.ReadKey();
}
}
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