Description: C# to create or use a TInterface generic interface source code examples, substantially achieve the idea: Create a generic interface public interface IGenericInterface interface call to the CreateInstance method to achieve the above generic interface generic class, derived constraint where T: TI ( T to inherit from Ti) constructor constraint where T: new () (T instance), and then create create a public method CreateInstance, the instantiated interface output specify the generic type, create a generic interface is complete, complete source code
To Search:
File list (Check if you may need any files):
TInterface\TInterface\Program.cs
..........\..........\...perties\AssemblyInfo.cs
..........\..........\TInterface.csproj
..........\TInterface.sln
..........\TInterface.suo
..........\..........\Properties
..........\TInterface
TInterface