C# - Multiple Attributes in one?
===

I have these properties (A,B) :

    [DataType(DataType.MultilineText)]
    [Required(ErrorMessage = "A is required"), DisplayName("A")]
    [StringLength(Constants.MaximunStringSize)]
    public string A { get; set; }

    [DataType(DataType.MultilineText)]
    [Required(ErrorMessage = "B is required"), DisplayName("B")]
    [StringLength(Constants.MaximunStringSize)]
    public string B { get; set; }

I can create a class that "inherits" all the attributes (DataType, Required, StringLength, DisplayName) and the set through its constructor?. By example:

    [MyAttribute("A","A is required")]
    public string A { get; set; }

    [MyAttribute("B","B is required")]
    public string B { get; set; }
