Suggérer une traduction
 
Suggestions d'autres utilisateurs :

progress indicator
Aucune autre suggestion.
Cliquez pour évaluer et commenter
MSDN
MSDN Library
Développement .NET
.NET Framework 4
Espaces de noms System.Web
System.Web.UI.WebControls
StringArrayConverter, classe
Réduire tout/Développer tout Réduire tout
Affichage du contenu :  côte à côteAffichage du contenu : côte à côte
.NET Framework Class Library
StringArrayConverter Class

Provides a type converter to convert a string of comma-separated values to and from an array of strings.

System..::.Object
  System.ComponentModel..::.TypeConverter
    System.Web.UI.WebControls..::.StringArrayConverter

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)
Visual Basic
Public Class StringArrayConverter _
    Inherits TypeConverter
C#
public class StringArrayConverter : TypeConverter
Visual C++
public ref class StringArrayConverter : public TypeConverter
F#
type StringArrayConverter =  
    class
        inherit TypeConverter
    end

The StringArrayConverter type exposes the following members.

  NameDescription
Public methodStringArrayConverterInitializes a new instance of the StringArrayConverter class.
Top
  NameDescription
Public methodCanConvertFrom(Type)Returns whether this converter can convert an object of the given type to the type of this converter. (Inherited from TypeConverter.)
Public methodCanConvertFrom(ITypeDescriptorContext, Type)Determines whether the StringArrayConverter can convert the specified source type to an array of strings. (Overrides TypeConverter..::.CanConvertFrom(ITypeDescriptorContext, Type).)
Public methodCanConvertTo(Type)Returns whether this converter can convert the object to the specified type. (Inherited from TypeConverter.)
Public methodCanConvertTo(ITypeDescriptorContext, Type)Returns whether this converter can convert the object to the specified type, using the specified context. (Inherited from TypeConverter.)
Public methodConvertFrom(Object)Converts the given value to the type of this converter. (Inherited from TypeConverter.)
Public methodConvertFrom(ITypeDescriptorContext, CultureInfo, Object)Converts the specified comma-separated string into an array of strings. (Overrides TypeConverter..::.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object).)
Public methodConvertFromInvariantString(String)Converts the given string to the type of this converter, using the invariant culture. (Inherited from TypeConverter.)
Public methodConvertFromInvariantString(ITypeDescriptorContext, String)Converts the given string to the type of this converter, using the invariant culture and the specified context. (Inherited from TypeConverter.)
Public methodConvertFromString(String)Converts the specified text to an object. (Inherited from TypeConverter.)
Public methodConvertFromString(ITypeDescriptorContext, String)Converts the given text to an object, using the specified context. (Inherited from TypeConverter.)
Public methodConvertFromString(ITypeDescriptorContext, CultureInfo, String)Converts the given text to an object, using the specified context and culture information. (Inherited from TypeConverter.)
Public methodConvertTo(Object, Type)Converts the given value object to the specified type, using the arguments. (Inherited from TypeConverter.)
Public methodConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)Converts an array of strings into a string of values separated by commas. (Overrides TypeConverter..::.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type).)
Public methodConvertToInvariantString(Object)Converts the specified value to a culture-invariant string representation. (Inherited from TypeConverter.)
Public methodConvertToInvariantString(ITypeDescriptorContext, Object)Converts the specified value to a culture-invariant string representation, using the specified context. (Inherited from TypeConverter.)
Public methodConvertToString(Object)Converts the specified value to a string representation. (Inherited from TypeConverter.)
Public methodConvertToString(ITypeDescriptorContext, Object)Converts the given value to a string representation, using the given context. (Inherited from TypeConverter.)
Public methodConvertToString(ITypeDescriptorContext, CultureInfo, Object)Converts the given value to a string representation, using the specified context and culture information. (Inherited from TypeConverter.)
Public methodCreateInstance(IDictionary)Re-creates an Object given a set of property values for the object. (Inherited from TypeConverter.)
Public methodCreateInstance(ITypeDescriptorContext, IDictionary)Creates an instance of the type that this TypeConverter is associated with, using the specified context, given a set of property values for the object. (Inherited from TypeConverter.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodGetConvertFromExceptionReturns an exception to throw when a conversion cannot be performed. (Inherited from TypeConverter.)
Protected methodGetConvertToExceptionReturns an exception to throw when a conversion cannot be performed. (Inherited from TypeConverter.)
Public methodGetCreateInstanceSupported()()()Returns whether changing a value on this object requires a call to the CreateInstance method to create a new value. (Inherited from TypeConverter.)
Public methodGetCreateInstanceSupported(ITypeDescriptorContext)Returns whether changing a value on this object requires a call to CreateInstance to create a new value, using the specified context. (Inherited from TypeConverter.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetProperties(Object)Returns a collection of properties for the type of array specified by the value parameter. (Inherited from TypeConverter.)
Public methodGetProperties(ITypeDescriptorContext, Object)Returns a collection of properties for the type of array specified by the value parameter, using the specified context. (Inherited from TypeConverter.)
Public methodGetProperties(ITypeDescriptorContext, Object, array<Attribute>[]()[])Returns a collection of properties for the type of array specified by the value parameter, using the specified context and attributes. (Inherited from TypeConverter.)
Public methodGetPropertiesSupported()()()Returns whether this object supports properties. (Inherited from TypeConverter.)
Public methodGetPropertiesSupported(ITypeDescriptorContext)Returns whether this object supports properties, using the specified context. (Inherited from TypeConverter.)
Public methodGetStandardValues()()()Returns a collection of standard values from the default context for the data type this type converter is designed for. (Inherited from TypeConverter.)
Public methodGetStandardValues(ITypeDescriptorContext)Returns a collection of standard values for the data type this type converter is designed for when provided with a format context. (Inherited from TypeConverter.)
Public methodGetStandardValuesExclusive()()()Returns whether the collection of standard values returned from GetStandardValues is an exclusive list. (Inherited from TypeConverter.)
Public methodGetStandardValuesExclusive(ITypeDescriptorContext)Returns whether the collection of standard values returned from GetStandardValues is an exclusive list of possible values, using the specified context. (Inherited from TypeConverter.)
Public methodGetStandardValuesSupported()()()Returns whether this object supports a standard set of values that can be picked from a list. (Inherited from TypeConverter.)
Public methodGetStandardValuesSupported(ITypeDescriptorContext)Returns whether this object supports a standard set of values that can be picked from a list, using the specified context. (Inherited from TypeConverter.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodIsValid(Object)Returns whether the given value object is valid for this type. (Inherited from TypeConverter.)
Public methodIsValid(ITypeDescriptorContext, Object)Returns whether the given value object is valid for this type and for the specified context. (Inherited from TypeConverter.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodSortPropertiesSorts a collection of properties. (Inherited from TypeConverter.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The StringArrayConverter class converts a string of comma-separated values to and from an array of strings. This class provides the ConvertTo and ConvertFrom methods to perform the type conversions.

This type converter is used by design-time environments to provide values for display in the property grid control for a specified type.

NoteNote

You should never access a type converter directly. Instead, call the appropriate converter by using the System.ComponentModel..::.TypeDescriptor class. For more information, see the examples in the TypeConverter base class.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Bibliothèque de classes .NET Framework
StringArrayConverter, classe

Fournit un convertisseur de type pour convertir une chaîne de valeurs séparées par des virgules vers et à partir d'un tableau de chaînes.

System..::.Object
  System.ComponentModel..::.TypeConverter
    System.Web.UI.WebControls..::.StringArrayConverter

Espace de noms :  System.Web.UI.WebControls
Assembly :  System.Web (dans System.Web.dll)
Visual Basic
Public Class StringArrayConverter _
    Inherits TypeConverter
C#
public class StringArrayConverter : TypeConverter
VisualC++
public ref class StringArrayConverter : public TypeConverter
F#
type StringArrayConverter =  
    class
        inherit TypeConverter
    end

Le type StringArrayConverter expose les membres suivants.

  NomDescription
Méthode publiqueStringArrayConverterInitialise une nouvelle instance de la classe StringArrayConverter.
Début
  NomDescription
Méthode publiqueCanConvertFrom(Type)Retourne une valeur indiquant si ce convertisseur peut convertir un objet du type donné en objet du type de ce convertisseur. (Hérité de TypeConverter.)
Méthode publiqueCanConvertFrom(ITypeDescriptorContext, Type)Détermine si le StringArrayConverter peut convertir le type de source spécifié en un tableau de chaînes. (Substitue TypeConverter..::.CanConvertFrom(ITypeDescriptorContext, Type).)
Méthode publiqueCanConvertTo(Type)Retourne une valeur indiquant si ce convertisseur peut convertir l'objet en objet du type spécifié. (Hérité de TypeConverter.)
Méthode publiqueCanConvertTo(ITypeDescriptorContext, Type)Retourne une valeur indiquant si ce convertisseur peut convertir l'objet en objet du type spécifié, à l'aide du contexte déterminé. (Hérité de TypeConverter.)
Méthode publiqueConvertFrom(Object)Convertit la valeur donnée en valeur du type de ce convertisseur. (Hérité de TypeConverter.)
Méthode publiqueConvertFrom(ITypeDescriptorContext, CultureInfo, Object)Convertit la chaîne séparée par des virgules spécifiée en un tableau de chaînes. (Substitue TypeConverter..::.ConvertFrom(ITypeDescriptorContext, CultureInfo, Object).)
Méthode publiqueConvertFromInvariantString(String)Convertit la chaîne donnée en représentation sous forme de chaîne du type de ce convertisseur, à l'aide de la culture dite indifférente. (Hérité de TypeConverter.)
Méthode publiqueConvertFromInvariantString(ITypeDescriptorContext, String)Convertit la chaîne donnée au type de ce convertisseur, à l'aide des informations de culture indifférente et du contexte spécifiés. (Hérité de TypeConverter.)
Méthode publiqueConvertFromString(String)Convertit le texte spécifié en objet. (Hérité de TypeConverter.)
Méthode publiqueConvertFromString(ITypeDescriptorContext, String)Convertit le texte donné en objet, à l'aide du contexte spécifié. (Hérité de TypeConverter.)
Méthode publiqueConvertFromString(ITypeDescriptorContext, CultureInfo, String)Convertit le texte donné en objet, à l'aide du contexte et des informations de culture spécifiés. (Hérité de TypeConverter.)
Méthode publiqueConvertTo(Object, Type)Convertit l'objet de valeur donné en objet du type spécifié, à l'aide des arguments. (Hérité de TypeConverter.)
Méthode publiqueConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)Convertit un tableau de chaînes en une chaîne de valeurs séparée par des virgules. (Substitue TypeConverter..::.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type).)
Méthode publiqueConvertToInvariantString(Object)Convertit la valeur spécifiée en représentation sous forme de chaîne de culture dite indifférente. (Hérité de TypeConverter.)
Méthode publiqueConvertToInvariantString(ITypeDescriptorContext, Object)Convertit la valeur spécifiée en représentation sous forme de chaîne de culture dite indifférente, à l'aide du contexte déterminé. (Hérité de TypeConverter.)
Méthode publiqueConvertToString(Object)Convertit la valeur spécifiée en représentation sous forme de chaîne. (Hérité de TypeConverter.)
Méthode publiqueConvertToString(ITypeDescriptorContext, Object)Convertit la valeur donnée en représentation sous forme de chaîne, à l'aide du contexte déterminé. (Hérité de TypeConverter.)
Méthode publiqueConvertToString(ITypeDescriptorContext, CultureInfo, Object)Convertit la valeur donnée en représentation sous forme de chaîne, à l'aide du contexte et des informations de culture spécifiés. (Hérité de TypeConverter.)
Méthode publiqueCreateInstance(IDictionary)Recrée un Object en fonction d'un jeu de valeurs de propriétés de l'objet. (Hérité de TypeConverter.)
Méthode publiqueCreateInstance(ITypeDescriptorContext, IDictionary)Crée une instance du type auquel ce TypeConverter est associé, en utilisant le contexte spécifié, en fonction d'un ensemble de valeurs de propriété de l'objet. (Hérité de TypeConverter.)
Méthode publiqueEquals(Object)Détermine si l'Object spécifié est égal à l'Object en cours. (Hérité de Object.)
Méthode protégéeFinalizeAutorise un objet à tenter de libérer des ressources et d'exécuter d'autres opérations de netto***ge avant qu'il ne soit récupéré par l'opération garbage collection. (Hérité de Object.)
Méthode protégéeGetConvertFromExceptionRetourne une exception à lever lorsqu'une conversion ne peut pas être effectuée. (Hérité de TypeConverter.)
Méthode protégéeGetConvertToExceptionRetourne une exception à lever lorsqu'une conversion ne peut pas être effectuée. (Hérité de TypeConverter.)
Méthode publiqueGetCreateInstanceSupported()()()Retourne une valeur indiquant si la modification d'une valeur de cet objet nécessite un appel à la méthode CreateInstance pour créer une nouvelle valeur. (Hérité de TypeConverter.)
Méthode publiqueGetCreateInstanceSupported(ITypeDescriptorContext)Retourne une valeur indiquant si la modification d'une valeur de cet objet nécessite l'appel à CreateInstance pour la création d'une nouvelle valeur, à l'aide du contexte spécifié. (Hérité de TypeConverter.)
Méthode publiqueGetHashCodeSert de fonction de hachage pour un type particulier. (Hérité de Object.)
Méthode publiqueGetProperties(Object)Retourne une collection de propriétés pour le type de tableau spécifié par le paramètre de valeur. (Hérité de TypeConverter.)
Méthode publiqueGetProperties(ITypeDescriptorContext, Object)Retourne une collection de propriétés pour le type de tableau spécifié par le paramètre de valeur, à l'aide du contexte déterminé. (Hérité de TypeConverter.)
Méthode publiqueGetProperties(ITypeDescriptorContext, Object, array<Attribute>[]()[])Retourne une collection de propriétés pour le type de tableau spécifié par le paramètre de valeur, à l'aide du contexte et des attributs déterminés. (Hérité de TypeConverter.)
Méthode publiqueGetPropertiesSupported()()()Retourne une valeur indiquant si l'objet prend en charge les propriétés. (Hérité de TypeConverter.)
Méthode publiqueGetPropertiesSupported(ITypeDescriptorContext)Retourne une valeur indiquant si cet objet prend en charge les propriétés, en utilisant le contexte spécifié. (Hérité de TypeConverter.)
Méthode publiqueGetStandardValues()()()Retourne une collection de valeurs standard à partir du contexte par défaut du type de données pour lequel ce convertisseur de type est conçu. (Hérité de TypeConverter.)
Méthode publiqueGetStandardValues(ITypeDescriptorContext)Retourne une collection de valeurs standard pour le type de données pour lequel ce convertisseur de type est conçu lorsqu'il est fourni avec un contexte de format. (Hérité de TypeConverter.)
Méthode publiqueGetStandardValuesExclusive()()()Retourne une valeur indiquant si la collection de valeurs standard retournée par GetStandardValues est une liste exclusive. (Hérité de TypeConverter.)
Méthode publiqueGetStandardValuesExclusive(ITypeDescriptorContext)Retourne une valeur indiquant si la collection de valeurs standard retournée par GetStandardValues est une liste exclusive des valeurs possibles, utilisant le contexte spécifié. (Hérité de TypeConverter.)
Méthode publiqueGetStandardValuesSupported()()()Retourne une valeur indiquant si cet objet prend en charge un jeu standard de valeurs qui peuvent être sélectionnées dans une liste. (Hérité de TypeConverter.)
Méthode publiqueGetStandardValuesSupported(ITypeDescriptorContext)Retourne une valeur indiquant si cet objet prend en charge un jeu de valeurs standard pouvant être sélectionnées dans une liste, à l'aide du contexte spécifié. (Hérité de TypeConverter.)
Méthode publiqueGetTypeObtient le Type de l'instance actuelle. (Hérité de Object.)
Méthode publiqueIsValid(Object)Retourne une valeur indiquant si l'objet de valeur donné est valide pour ce type. (Hérité de TypeConverter.)
Méthode publiqueIsValid(ITypeDescriptorContext, Object)Retourne une valeur indiquant si l'objet de valeur donné est valide pour ce type et pour le contexte spécifié. (Hérité de TypeConverter.)
Méthode protégéeMemberwiseCloneCrée une copie superficielle de l'objet Object actif. (Hérité de Object.)
Méthode protégéeSortPropertiesTrie une collection de propriétés. (Hérité de TypeConverter.)
Méthode publiqueToStringRetourne une chaîne qui représente l'objet actuel. (Hérité de Object.)
Début

La classe StringArrayConverter convertit une chaîne de valeurs séparées par des virgules vers et à partir d'un tableau de chaînes. Cette classe fournit les méthodes ConvertTo et ConvertFrom pour exécuter les conversions de types.

Ce convertisseur de type est utilisé par les environnements au moment du design pour fournir des valeurs d'affichage dans le contrôle de grille de propriétés d'un type spécifié.

RemarqueRemarque

Vous ne devez jamais accéder directement à un convertisseur de type. Appelez plutôt le convertisseur approprié à l'aide de la classe System.ComponentModel..::.TypeDescriptor. Pour plus d'informations, consultez les exemples dans la classe de base TypeConverter.

.NET Framework

Pris en charge dans : 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 ou ultérieur, Windows XP SP3, Windows XP SP2 Édition x64, Windows Server 2008 (installation minimale non prise en charge), Windows Server 2008 R2 (installation minimale prise en charge avec SP1 ou version ultérieure), Windows Server 2003 SP2

Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.
Tous les membres static (Shared en Visual Basic) publics de ce type sont thread-safe. Il n'est pas garanti que les membres d'instance soient thread-safe.
Contenu de la communauté   Qu'est-ce que le Contenu de la communauté ?
Ajouter du contenu RSS  Annotations
Processing
© 2012 Microsoft. Tous droits réservés. Conditions d'utilisation | Marques | Confidentialité
Page view tracker