如何在vb.net中查找文本文件中的单词总数 [英] How to find total number of word in a text file in vb.net

查看:106
本文介绍了如何在vb.net中查找文本文件中的单词总数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
如何在vb.net中查找文本文件中的单词总数


感谢

hi all,
How to find total number of word in a text file in vb.net


thanks

推荐答案

请参阅 http://www.xtremedotnettalk .com/showthread.php?t = 96603 [ ^ ]了解一些解决方案.
See http://www.xtremedotnettalk.com/showthread.php?t=96603[^] for some solutions.


在此处查看示例
See here the sample to parse file for separate words and add code to count words.


假设您已经加载了文件转换成名为myData:
的单个字符串
Assuming you''ve already loaded the file into a single string called myData:

Dim parts As String() = myData.Split(" ")
Dim count As Integer = parts.Length


这篇关于如何在vb.net中查找文本文件中的单词总数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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