Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interfaces
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Interfaces
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01444635
Message ID:
01444635
Vues:
120
Hi,

I ran into the following issue with Interfaces:

Some form class implements an interface, e.g. IMyInterface.

The textboxes on the form are based on textboxes in a class library like this:
namespace MyCompany
{

    public class MyTextBox : System.Windows.Forms.TextBox
    {
        protected override void OnTextChanged(EventArgs e)
        {
            Control o = this.parent;
            if (o != null && (o is IMyInterface))
            {
                ((IMyInterface)o).MyMethod(false);
            }
            base.OnTextChanged(e);
        }
    }

}
Compiler complaints that IMyInterface "The type of namespace 'IMyInterface' could not be found..." Do I need to declare the Interface in this library too? What else am I missing?

TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform