How to set ExpandoObject's dictionary as case insensitive?
问题 given the code below dynamic e = new ExpandoObject(); var d = e as IDictionary<string, object>; for (int i = 0; i < rdr.FieldCount; i++) d.Add(rdr.GetName(i), DBNull.Value.Equals(rdr[i]) ? null : rdr[i]); Is there a way to make it case insensitive so given the field name employee_name e.Employee_name works just as well as e.employee_name there doesn't seem to be an obvious way, perhaps a hack ? 回答1: You may checkout Massive's implementation of a MassiveExpando which is case insensitive