SerializationInfo.GetDateTime(String) Metodo
Definizione
Recupera un valore DateTime dall'archivio SerializationInfo.Retrieves a DateTime value from the SerializationInfo store.
public:
DateTime GetDateTime(System::String ^ name);
public DateTime GetDateTime (string name);
member this.GetDateTime : string -> DateTime
Public Function GetDateTime (name As String) As DateTime
Parametri
- name
- String
Nome associato al valore da recuperare.The name associated with the value to retrieve.
Restituisce
Eccezioni
name
è null
.name
is null
.
Il valore associato a name
non può essere convertito in un valore DateTime.The value associated with name
cannot be converted to a DateTime value.
Non è possibile trovare un elemento con il nome specificato nell'istanza corrente.An element with the specified name is not found in the current instance.
Commenti
Se il valore è un DateTimeoggetto o può essere convertito in un DateTimeoggetto, viene restituito tale valore. in caso InvalidCastException contrario, viene generata un'eccezione.If the value is a DateTime, or can be converted to a DateTime, that value is returned; otherwise, a InvalidCastException is thrown. Tutte le IFormatterConverter conversioni vengono eseguite dall'oggetto associato SerializationInfoa.All conversions are done by the IFormatterConverter associated with this SerializationInfo.