You are seeing a limited-style version of this site. Please upgrade your browser to view the site as it was meant. You can try Firefox, Google Chrome, or even Safari.

Brandon Martinez

Posts Tagged ‘Interfaces’

 

C# Interfaces: Under (No) Construction?

Posted in: Technology | , ,

Why can’t C# allow for a constructor definition in an Interface? For example, say you have this interface:

namespace ValidationServices.Customers
{
  public interface ICustomer
  {
    // Properties
    ValidationRequest Request{ get; set;}

    // Methods
    ValidationResponse ValidateOrder();
    //....
    // and so on
    //....
  }
}

Continue Reading…