Aracılığıyla paylaş


ProfilePropertySettings.Type Özellik

Tanım

Dinamik olarak oluşturulan ProfileCommon sınıfta ilişkili özelliğin türünün adını alır veya ayarlar.

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

Özellik Değeri

String

Geçerli, tam tür başvurusu veya boş dize (""). Varsayılan değer boş bir dizedir.

Öznitelikler

Örnekler

Aşağıdaki kod örneği özelliğinin Type nasıl kullanılacağını gösterir. Bu kod örneği, sınıfı için ProfileSection sağlanan daha büyük bir örneğin parçasıdır.

// 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"

Açıklamalar

Geçerli bir tür başvurusuna ayarlandığında, bu tür oluşturulan ProfileCommon sınıftaki adlandırılmış özellik için kullanılır.

Tür başvurusu aşağıdaki gibi oluşturulur (köşeli ayraç içindeki öğeler gerekli değildir): Namespace.Typename, Assemblyname[,] [Version=x,] [Culture=y,] [PublicKeyToken=z]

Örneğin:

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

Şunlara uygulanır

Ayrıca bkz.