類 我有一個包含一些成員,其可以從外部源被修飾的類: class CNode
{
protected:
// these members might be changed by users
std::string m_sName;
CState m_CurrentState;
CColor m_DiffuseColor;
};
樣品被簡化,它具有多
有沒有辦法隱藏基類的成員? class A
{
public int MyProperty { get; set; }
}
class B : A
{
private new int MyProperty { get; set; }
}
class C : B
{
public C()
{
//this should be an