动态地向Dictionary添加值 [英] Dynamically add values to a Dictionary

查看:103
本文介绍了动态地向Dictionary添加值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



任何人都可以告诉我如何从数据库中获取字典值。可以添加更少的数据 -

Dict。添加(Cat,1)

但是如何访问数据库并将值插入到我的字典中。

解决方案

看到这个链接:



使用Dictionary从数据库中检索值 [ ^ ]



这只是检索。但是,不知何故,你可能会对它的运作方式有所了解。



希望它有所帮助! :)

Hi,
Can anyone tell me how to get values to a Dictionary from the database.Its possible to add less data like this -
Dict.Add("Cat",1)
But how can i access a database and insert values to my dictionary.

解决方案

Hi, See this link:

Retrieve values from database using Dictionary[^]

It's only retrieving. But then, Somehow, You may get an Idea on how It Works.

Hope it Helps! :)


这篇关于动态地向Dictionary添加值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆