I had a coworker see this the other day and I'm not quite sure why this happened. Can anyone explain it?
We have class A:
using System;
using System.Data;
public class A
{
protected DataTable _table;
public A()
{
}
}
We have class B that inherits from class A (assume there in the same namespace):
using System;
public class B : A
{
public B()
{
}
}
In the constructor of class B, if I try this._table, it doesn't compile? Why does it not?
But to get it to work, I have to add using System.Data; and everything works fine.
Why does .NET not do this for me? So that when I try to access the protected member, it knows that its a System.Data.DataTable?
forgive me if the classes are 100% correct...