Comment puis-je accéder au résultat d'une instruction if dans un contrôle utilisateur?comment accéder à l'instruction i dans usercontrol
UserControl code:
public bool SendBack(bool huh)
{
if(huh)
huh = true;
else huh = false;
return huh;
}
Et dans un autre projet que je suis en train d'y accéder comme ceci:
private void button1_Click(object sender, EventArgs e)
{
MyControl.TextControl t = (MyControl.TextCOntrol)sender;
if(t.SendBack(true))
{
// Do something.
}
}
Et que se passe-t-il en ce moment? –
Pour l'instant, il dit juste "Impossible de lancer le type RichTextBox à MyControl.TextControl" ... Et je suis un peu confus –