title: OOPS query using c#
body: <p>I have some doubt to implementation of class and interface</p>
  
  <p>I have 2 class like this</p>
  
  <pre><code>Public Class A:IFinal
    {
        private string name=string.Empty;
  
          A()
          {
              name = "Pankaj";
          }
  
          public string MyName()
          {
              return name;
          }
  
          public string YourName()
          {
              return "Amit";
          }
     }
  
  Public  Class B:IFinal
   {
       private string name=string.Empty;
  
          B()
          {
              name = "Amit";
          }
  
          public string GetNane()
          {
              return name;
          }
  
          public string YourName()
          {
              return "Joy";
          }
     }
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <ol>
  <li><p>Now i have a interface IFinal and i want to implement this interface in class A &amp; B for method YourName() like this</p>
  
  <p>public interface IFinal
      {</p>
  
  <pre><code>     string YourName();// Class A &amp; Class B
  
  
  }
  </code></pre></li>
  </ol>
  
  <p>Is it possible to implement on this way? if yes then How can i declare  YourName() in interface and how can i use this?</p>
  
  <ol start="2">
  <li>Is it possible to declare virtual method in interface?like in class A &amp; B we have a virtual method which need to be declare in interface.</li>
  </ol>