다음을 통해 공유


DataConnectionProperties.AddProperty 메서드 (String, Type, array<Attribute )

동적으로이 데이터 연결 속성 인스턴스는 기본적으로 인식 되는 속성의 컬렉션에 새 속성을 추가 합니다.

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

구문

‘선언
Protected Function AddProperty ( _
    name As String, _
    type As Type, _
    ParamArray attributes As Attribute() _
) As PropertyDescriptor
protected PropertyDescriptor AddProperty(
    string name,
    Type type,
    params Attribute[] attributes
)
protected:
PropertyDescriptor^ AddProperty(
    String^ name, 
    Type^ type, 
    ... array<Attribute^>^ attributes
)
member AddProperty : 
        name:string * 
        type:Type * 
        attributes:Attribute[] -> PropertyDescriptor 
protected function AddProperty(
    name : String, 
    type : Type, 
    ... attributes : Attribute[]
) : PropertyDescriptor

매개 변수

  • type
    형식: System.Type
    속성의 데이터 형식입니다.
  • attributes
    형식: array<System.Attribute[]
    집합 속성에 연결 하는 특성입니다.

반환 값

형식: System.ComponentModel.PropertyDescriptor
새로 추가 된 속성 설명자입니다.

예외

예외 조건
ArgumentNullException

The name and/or type parameters are nullNull 참조(Visual Basic의 경우 Nothing).

ArgumentException

지정한 속성이 이미 있습니다.

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

DataConnectionProperties 클래스

AddProperty 오버로드

Microsoft.VisualStudio.Data.Framework 네임스페이스

RemoveProperty