Inherit Type Parameter : Generic Type : Generics C# Source Code


Custom Search

C# Source Code » Generics » Generic Type »

 

Inherit Type Parameter








    
 


using System;
using System.Collections.Generic;
using System.Text;

public class MyBaseClass<U> {
    private U _parentData;

    public MyBaseClass() { }

    public MyBaseClass(U val) {
        this._parentData = val;
    }
}

public class MySubClass<T, U> : MyBaseClass<U> {
    private T _myData;

    public MySubClass() { }

    public MySubClass(T val1, U val2)
        : base(val2) {
        this._myData = val1;
    }
}

          
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Generics
» Generic Type