ProfilePropertySettings.Type Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta il nome del tipo della proprietà associata nella classe generata 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
Valore della proprietà
Riferimento di tipo completo valido o stringa vuota (""). Il valore predefinito è una stringa vuota.
- Attributi
Esempio
Nell'esempio di codice seguente viene illustrato come utilizzare la Type proprietà . Questo esempio di codice fa parte di un esempio più ampio 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 utilizzato per la proprietà denominata nella classe generata ProfileCommon .
Il riferimento al tipo è formato come segue (gli elementi tra parentesi quadre non sono obbligatori): Namespace.Typename, Assemblyname[,] [Version=x,] [Culture=y,] [PublicKeyToken=z]
Per esempio:
"ExampleNameSpace.ExampleType, Example.Assembly, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%"