title: How to Implement Interface Functions in User Control
body: <p>Hi I'm creating test application that has a user control with a Button that will be reference in a Form.</p>
  
  <p><img src="https://i.stack.imgur.com/fiJra.png" alt="enter image description here"></p>
  
  <p>Is it possible to bind interface</p>
  
  <pre><code> public interface ICRUD
      {
          void Test();
      } 
  </code></pre>
  
  <p>to the user Control button1 click event</p>
  
  <pre><code>public partial class UserControl1 : UserControl
  {
      public UserControl1()
      {
          InitializeComponent();
  
      }
      private void button1_Click(object sender, EventArgs e)
      {
          //CALL ICRUD.Test() execute when click on form1 and then show I am Clicked
      }
  }
  </code></pre>
  
  <p>so that
  i just need to implement only the interface functions to my form1.</p>
  
  <p>Form1:</p>
  
  <pre><code>using System.Windows.Forms;
  namespace TEST
  {
      public partial class Form1 : Form , ICRUD
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          public void Test()
          {
              MessageBox.Show("I am Clicked");
          }
      }
  }
  </code></pre>
  
  <p>Thanks in Regards.</p>