DocumentBase.Parent 属性

定义

获取文档的父对象。

public object Parent { get; }

属性值

Object

文档的父对象。

示例

下面的代码示例显示一条消息,该消息显示文档的父级。 若要使用此示例,请在 ThisDocument 文档级项目的类中运行它。

private void DocumentParent()
{
    MessageBox.Show("The parent of the document is: " +
        this.Parent.ToString());
}
Private Sub DocumentParent()
    MessageBox.Show("The parent of the document is: " & Me.Parent.ToString())
End Sub

适用于