Table of Contents

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 int

Maximum string length allowed.

Properties

Length

Gets the maximum length allowed for a string type parameter.

public int Length { get; }

Property Value

int