Skip to content

Instantly share code, notes, and snippets.

@carloscds

carloscds/DI_IServico.cs

Last active Feb 14, 2020
Embed
What would you like to do?
using System;
public interface IServico
{
public void Executa();
}
public class ServicoCarro : IServico
{
public void Executa()
{
System.Console.WriteLine("Serviço executado no carro!");
}
}
public class ServicoMoto : IServico
{
public void Executa()
{
System.Console.WriteLine("Serviço executado na moto!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment