Hey no problem we all have to learn. Basically an interface is just that just a set of properties and methods that tell you how to access a class. So they naturally come with no code. However when you impliment an interface you also have to impliment the
code to define that interface. For example:
using System;
namespace Dados
{
public class Manutencao : IDados
{
private string _nome;
private string _idade;
public Manutencao() { }
public string Nome
{
get { return _nome; }
set { _nome = value; }
}
public string Idade
{
get { return _idade; }
set { _idade = value; }
}
}
}
nberardi
Star
11233 Points
2352 Posts
Re: must declare a body because it is not marked abstract or extern
Oct 03, 2006 02:46 PM|LINK
using System; namespace Dados { public class Manutencao : IDados { private string _nome; private string _idade; public Manutencao() { } public string Nome { get { return _nome; } set { _nome = value; } } public string Idade { get { return _idade; } set { _idade = value; } } } }