다음을 통해 공유


ProfilePropertySettings.Type 속성

정의

동적으로 생성된 ProfileCommon 클래스에서 연결된 속성 형식의 이름을 가져오거나 설정합니다.

public:
 property System::String ^ Type { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("type", DefaultValue="string")]
public string Type { get; set; }
[<System.Configuration.ConfigurationProperty("type", DefaultValue="string")>]
member this.Type : string with get, set
Public Property Type As String

속성 값

유효한 정규화된 형식 참조 또는 빈 문자열("")입니다. 기본값은 빈 문자열입니다.

특성

예제

다음 코드 예제에서는 속성을 사용 하는 방법을 보여 있습니다 Type . 이 코드 예제는 클래스에 제공된 더 큰 예제의 ProfileSection 일부입니다.

// Get the current Type property value.
Console.WriteLine(
    "Current Type value: '{0}'", profilePropertySettings.Type);

// Set the Type property to "System.DateTime".
profilePropertySettings.Type = "System.DateTime";
' Get the current Type property value.
Console.WriteLine( _
    "Current Type value: '{0}'", profilePropertySettings.Type)

' Set the Type property to "System.DateTime".
profilePropertySettings.Type = "System.DateTime"

설명

유효한 형식 참조로 설정하면 이 형식은 생성된 클래스의 명명된 ProfileCommon 속성에 사용됩니다.

형식 참조는 다음과 같이 구성됩니다(대괄호 안의 항목은 필요하지 않음). Namespace.Typename, Assemblyname[,] [Version=x,] [Culture=y,] [PublicKeyToken=z]

다음은 그 예입니다.

"ExampleNameSpace.ExampleType, Example.Assembly, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%"

적용 대상

추가 정보