Share via


Property.Object 속성

Property 개체를 지원하는 개체를 가져오거나 설정합니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
Property Object As Object
Object Object { get; set; }
property Object^ Object {
    Object^ get ();
    void set (Object^ value);
}
abstract Object : Object with get, set
function get Object () : Object 
function set Object (value : Object)

속성 값

형식: Object
Property 개체의 값을 나타내는 개체입니다.

설명

추가 기능에서 Property.Object 대신 Property.Value를 사용하면 Property 개체는 Object 값이 아니라 Properties 컬렉션을 반환합니다. 즉, Property.Object를 통해 반환될 IDispatch가 래핑되어 Property.Value에서 중첩 Properties 컬렉션을 반환합니다.

예제

' Visual Studio macro.
Sub ObjectExample3(ByVal dte As DTE2)

    ' Retrieve and display the text editor color setting for 
    ' code comments.
    Dim props As Properties = _
        dte.Properties("FontsAndColors", "TextEditor")
    Dim prop As [Property] = props.Item("FontsAndColorsItems")
    Dim items As FontsAndColorsItems = _
        CType(prop.Object, FontsAndColorsItems)
    Dim item As ColorableItems = items.Item("Comment")

    MsgBox(item.Name & " items have an OLE_COLOR value of " & _
        item.Foreground.ToString() & vbCrLf)

End Sub
public void ObjectExample(DTE2 dte)
{
    // Retrieve and display the text editor color setting for 
    // code comments.
    Properties props = 
        dte.get_Properties("FontsAndColors", "TextEditor");
    Property prop = props.Item("FontsAndColorsItems");
    FontsAndColorsItems items = (FontsAndColorsItems)prop.Object;
    ColorableItems item = items.Item("Comment");

    MessageBox.Show(item.Name + " items have an OLE_COLOR value of " + 
        item.Foreground.ToString() + "\n");
}

.NET Framework 보안

참고 항목

참조

Property 인터페이스

EnvDTE 네임스페이스

기타 리소스

방법: 자동화 개체 모델 코드의 예제 컴파일 및 실행