Does C# allows partial interface? i.e., in ManagerFactory1.cs class, I have
public partial interface IManagerFactory { // Get Methods ITescoManager GetTescoManager(); ITescoManager GetTescoManager(INHibernateSession session); }
and in ManagerFactory.cs class, I have:
public partial interface IManagerFactory { // Get Methods IEmployeeManager GetEmployeeManager(); IEmployeeManager GetEmployeeManager(INHibernateSession session); IProductManager GetProductManager(); IProductManager GetProductManager(INHibernateSession session); IStoreManager GetStoreManager(); IStoreManager GetStoreManager(INHibernateSession session); }
Both ManagerFactory and ManagerFactory1 are located in the same assembly.
The simplest way is just to try it 🙂
But yes, partial interfaces are allowed.
Valid locations for the
partialmodifier (with C# 3.0 spec references):Section 10.2 of the spec contains most of the general details for partial types.
Invalid locations: