Condividi tramite


ProfilePropertySettings.Type Proprietà

Definizione

Ottiene o imposta il nome del tipo della proprietà associata nella classe ProfileCommon generata in modo dinamico.

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

Valore della proprietà

String

Riferimento a un tipo valido, completo o una stringa vuota (""). Il valore predefinito è una stringa vuota.

Attributi

Esempio

Nell'esempio di codice riportato di seguito viene illustrato come utilizzare la proprietà Type. Questo esempio di codice fa parte di un esempio più grande fornito per la 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"

Commenti

Se impostato su un riferimento di tipo valido, questo tipo viene usato per la proprietà denominata ProfileCommon nella classe generata.

Il riferimento al tipo è formato come indicato di seguito (gli elementi tra parentesi quadre non sono obbligatori): Namespace.Typename, Assemblyname[,] [Version=x,] [Culture=y,] [PublicKeyToken=z]

Ad esempio:

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

Si applica a

Vedi anche