StringValidatorAttribute.MaxLength プロパティ
アセンブリ: System.Configuration (system.configuration.dll 内)

Dim instance As StringValidatorAttribute Dim value As Integer value = instance.MaxLength instance.MaxLength = value
プロパティに割り当てることができる文字列の最大長を示す整数。

MaxLength プロパティを使用する方法の例を次に示します。
<ConfigurationProperty("fileName", _ DefaultValue:="default.txt", _ IsRequired:=True, _ IsKey:=False), _ StringValidator( _ InvalidCharacters:=" ~!@#$%^&*()[]{}/;'""|\", _ MinLength:=1, _ MaxLength:=60)> _ Public Property FileName() As String Get Return CStr(Me("fileName")) End Get Set(ByVal value As String) Me("fileName") = value End Set End Property
[ConfigurationProperty("fileName", DefaultValue = "default.txt" , IsRequired = true, IsKey = false)] [StringValidator(InvalidCharacters = " ~!@#$%^&*()[]{}/;'\"|\\" , MinLength = 1, MaxLength = 60)] public string FileName { get { return (string)this["fileName"]; } set { this["fileName"] = value; } }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からStringValidatorAttribute.MaxLength プロパティを検索する場合は、下記のリンクをクリックしてください。

- StringValidatorAttribute.MaxLength プロパティのページへのリンク