以下のクラスを考慮して
、大文字と小文字を区別しない文字列を実装するために何かできますか?
public class Attibute
{
// The Name should be case-insensitive
public string Name
{
get;
set;
}
public Attibute()
{
}
}
public class ClassWithAttributes
{
private List<Attributes> _attributes;
public ClassWithAttributes(){}
public AddAttribute(Attribute attribute)
{
// Whats the best way to implement the check?
_attributes.add(attribute);
}
}
クラスを編集して、もう少し客観的かつ具体的にしました