开发者

.NET:How to implement "Hashes"

开发者 https://www.devze.com 2023-02-02 12:35 出处:网络
In some programming languages, hashes are a simple concept: You give a \"keyword\" and the hash will return a \"value\". This is very helpful for linking two values etc...

In some programming languages, hashes are a simple concept:

You give a "keyword" and the hash will return a "value". This is very helpful for linking two values etc...

I want to do something similar for my application:

Basically depending on what items from a checkList are checked, another list is populated by text lines.

So, is 开发者_如何转开发it possible to create some kind of table where if I send a keyword it will return to me with a text line?

A good example is a shopping catalog. You check an item, and a list has to show the item's description, right?


I think you are looking for Dictionary(Of TKey, TValue).

There are some examples of how to use it in the documentation on MDSN. There are also some more examples on dotnetperls.

0

精彩评论

暂无评论...
验证码 换一张
取 消