Class MaxLengthAttribute
- Namespace
- Discord.Interactions
- Assembly
- Discord.Net.Interactions.dll
Sets the maximum length allowed for a string type parameter.
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class MaxLengthAttribute : Attribute
- Inheritance
-
MaxLengthAttribute
- Inherited Members
Constructors
MaxLengthAttribute(int)
Sets the maximum length allowed for a string type parameter.
public MaxLengthAttribute(int length)
Parameters
length
intMaximum string length allowed.
Properties
Length
Gets the maximum length allowed for a string type parameter.
public int Length { get; }