Compartir vía


ProfilePropertySettings.Type Propiedad

Definición

Obtiene o establece el nombre del tipo de la propiedad asociada en la clase generada ProfileCommon dinámicamente.

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 propiedad

Referencia de tipo válida, completa o una cadena vacía (""). El valor predeterminado es una cadena vacía.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar la Type propiedad . Este ejemplo de código forma parte de un ejemplo más grande proporcionado para la ProfileSection clase .

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

Comentarios

Cuando se establece en una referencia de tipo válida, este tipo se usa para la propiedad con nombre en la clase generada ProfileCommon .

La referencia de tipo se forma de la siguiente manera (los elementos entre corchetes no son necesarios): Namespace.Typename, Assemblyname[,] [Version=x,] [Culture=y,] [PublicKeyToken=z]

Por ejemplo:

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

Se aplica a

Consulte también