ProfilePropertySettings.Type Propriedade

Definição

Recebe ou define o nome do tipo da propriedade associada na classe gerada ProfileCommon dinamicamente.

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

Valor de Propriedade

Uma referência de tipo válida e totalmente qualificada, ou uma cadeia vazia (""). O padrão é uma cadeia de caracteres vazia.

Atributos

Exemplos

O seguinte exemplo de código mostra como usar a Type propriedade. Este exemplo de código faz parte de um exemplo maior fornecido para a ProfileSection classe.

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

Observações

Quando definido para uma referência de tipo válida, este tipo é usado para a propriedade nomeada na classe gerada ProfileCommon .

A referência do tipo é formada da seguinte forma (não são necessários itens entre parênteses): Namespace.Typename, Assemblyname[,] [Version=x,] [Culture=y,] [PublicKeyToken=z]

Por exemplo:

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

Aplica-se a

Ver também