المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Inheritance question



C# Programming
10-02-2009, 11:54 PM
I've referenced a dll made in VB.Net and now I need to inherit from some of the classes in the dll. Below is an example of how I did that:

class Tag : DataProvider.Trend.Tag
{
}

Now if I do like this:

DataProvider.Trend.Tag myBaseTag = new DataProvider.Trend.Tag();
Tag myTag = myBaseTag as Tag;

this results in that 'myTag' gets the value null. Why is that? How can I assign the value of myBaseTag to myTag?

Thanks for help!