|
1. Nothing works with Hashtable
[SerializableAttribute]
public class CartItemInfo: Hashtable {
public CartItemInfo (string itemId, string name, int qty, decimal price, string type, string categoryId, string productId) {
....
}
}
2. The impact of performance You can see the difference by cycling thousands of times.
3. The original CartItemInfo personally feels that there is nothing wrong with it. If each class needs an index value method, you can add a method instead of replacing it all (you can write a base class to inherit it and modify it for convenience). If not required for every class
I think it's enough to write a static method.
========================
for reference only |
|