我有一个关于类型转换的基本问题。
class A { }
class B : A { }
B b = new B();
A a = (A)b;
在上面的代码中是否会发生类型转换?
interface IA
{
void process();
}
class B : IA
{
#region IA Members
void IA.process()
{
throw new NotImplementedException();
}
#endregion
public void process() { }
}
B b = new B();
b.process();
((IA)b).process();
在上面的代码中是否会发生类型转换?