我需要在vb中的简单字典

编程入门 行业动态 更新时间:2024-10-25 14:23:09
本文介绍了我需要在vb中的简单字典的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

vb中简单字典的代码 创建字典时需要哪些控件

code for simple dictionary in vb Which controls needed while creating dictionary

推荐答案

我真的不建议使用GridView和文本框来执行此操作:当字典获取时,它的响应速度将非常慢大(因为您必须在按下键时从服务器重新加载GridView,或者在页面加载时将整个词典加载到javascript中). 与字典关联的自动完成文本框有什么问题? I wouldn''t really recommend doing this with a GridView and a textbox: it will get extremely slow to react when the dictionary gets large (as you either have to reload the GridView from the server when the key is pressed, or load the entire dictionary into the javascript at page load). What is wrong with an autocomplete textbox associated with a dictionary?

如果您询问要使用的类,则.NET中的标准字典类为Dictionary<>. 请参阅 msdn.microsoft/en-us/library/xfhwa508.aspx [^ ] 至于使用什么控件来显示它,则取决于您要执行的操作.它可能像两个文本框一样简单,用户可以在其中键入一个文本框,而另一个文本框将使用匹配的值进行更新.您只需在第一个文本框中处理文本框更改事件. 另外,如果您要显示整个字典(并且不大到不实用的程度),则可以使用从简单的ListBox到ListView的任何东西,甚至可以使用网格控件. If you are asking about what class to use, then the standard dictionary class in .NET is Dictionary<>. See msdn.microsoft/en-us/library/xfhwa508.aspx[^] And as to what control to use to display it, that depends on what you want to do. It could be as simple as two text boxes, where the user types into one text box, and the other text box updates with the matching value. You just handle the text box change event in the first text box. Alternatively, if you want to display the entire dictionary (and it''s not too large that that''s not practical), then you could use anything from a simple ListBox to a ListView, or even a grid control.

使用If条件.但是考虑大写和小写时会很长. use If conditions. But it will be lengthy when considering uppercase and lowercase.

更多推荐

我需要在vb中的简单字典

本文发布于:2023-11-27 08:50:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1637364.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字典   简单   vb

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!