public class EqualsAttribue<T> : Attribute
{
    public EqualsAttribue(T value)
    {
        Value = value;
    }
    public T Value { get; set; }
}

public class Person
{
    [EqualsAttribue<string>("Maciek")]
    public string Name { get; set; };
    [EqualsAttribue<int>(2)]
    public int Score { get; set; }
}