字典操作 [英] Dictionary Operations
本文介绍了字典操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚为字典中的特定键添加了3个值.现在我需要为该特定键删除一个值.您将建议如何执行此操作.在此先感谢
I just added 3 values for a specific key in a dictionary. now i need to remove one value for that specific key.wil u plz suggest how to do this. Thanks in advance
推荐答案
字典仅允许每个键使用一个值.如果您有一个允许很多的容器,请获取键引用的集合,然后删除需要从集合中删除的值.
A dictionary only allows one value per key. If you have a container that allows many, get the collection referenced by the key, then remove the value you need to remove from the collection.
我想知道如何为以下项添加3个值没有引起异常的特定名称?:cool:
I am wondering how you can add 3 values for a specific name without raising an exception?:cool:
这篇关于字典操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文