title: C# interface how to hide code
body: <p>I developed a class library containing an interface and an inherited class:</p>
  
  <pre><code>public interface testInterface
  {
      string GetAge(int year);
  }
  </code></pre>
  
  <p>and a class that extends this interface</p>
  
  <pre><code>public class testClass : testInterface
  {
      public string GetAge(int year)
      {
          int age = DateTime.Today.Year - year;
          return string.Format("Your age is {0}", age);
      }
  }
  </code></pre>
  
  <p>in another solution I created a console application and I referenced the class library dll. in the driver i created an object:</p>
  
  <pre><code>testClassLibrary1.testInterface obj = new testClassLibrary1.testClass();
  </code></pre>
  
  <p>and I called the method GetAge();
  When I debug, I can still see the code of the method getAge()
  How can I hide this code? I mean isn't the interface used to hide the method abstract? please advise.</p>