キーと値のペアのコレクションを処理する場合、Add()メソッドを使用することと直接割り当てることの間に違いはありますか?
たとえば、HtmlGenericControlには属性コレクションがあります。
var anchor = new HtmlGenericControl("a");
// These both work:
anchor.Attributes.Add("class", "xyz");
anchor.Attributes["class"] = "xyz";
それは純粋に好みの問題ですか、それともどちらかを行う理由がありますか?