Share via


PropertyCollection.AddProperty 메서드

새 속성을 컬렉션에 추가합니다.

네임스페이스:  Microsoft.VisualStudio.Utilities
어셈블리:  Microsoft.VisualStudio.CoreUtility(Microsoft.VisualStudio.CoreUtility.dll)

구문

‘선언
Public Sub AddProperty ( _
    key As Object, _
    property As Object _
)
public void AddProperty(
    Object key,
    Object property
)
public:
void AddProperty(
    Object^ key, 
    Object^ property
)
member AddProperty : 
        key:Object * 
        property:Object -> unit
public function AddProperty(
    key : Object, 
    property : Object
)

매개 변수

  • key
    형식: Object

    속성을 검색할 수 있는 키입니다. 비 수 있어야-nullNull 참조(Visual Basic의 경우 Nothing).

  • property
    형식: Object

    키와 연결할 속성입니다.

예외

예외 조건
ArgumentNullException

key가 nullNull 참조(Visual Basic의 경우 Nothing)입니다.

ArgumentException

동일한 키를 가진 요소가 이미 컬렉션에 있습니다.

.NET Framework 보안

참고 항목

참조

PropertyCollection 클래스

Microsoft.VisualStudio.Utilities 네임스페이스