问题描述
我有一个程序,用户在其中向文本框中输入单词,我希望vb检查该单词是否存在于用户计算机桌面上的文本文件中,如果显示,则显示一个消息框.
对于此示例,我使用以下内容:
ReaderTextFile.txt-文件名
txtFileStr-文本框
texfile可以包含单词列表,如下所示:
i have a programme where the user enters a word into a textbox and i want vb to check if that word exists in a textfile located on the desktop of the user''s computer and if it is then a messagebox is displayed.
for this example i am using the following:
ReaderTextFile.txt - File Name
txtFileStr - Textbox
texfile can contain a list of words like below:
this
is
a
textfile
抱歉,我没有提供任何代码,因为我是新手,也不知道如何执行此任务.
谢谢任何帮助者.
sorry i haven''t provided any code as i am a novice and have no idea of how to go about with this task.
thank you to any helpers.
推荐答案
VB.Net
MSDN
string operations
for loop
另外,在VB.Net上阅读一本书.大多数包含有关文件操作的部分.
Also, read a book on VB.Net. Most contain sections about file operations.
这篇关于通过拆分读取文本文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!