您是想問vb.net查找未使用的函數(shù)方法嗎?vb.net查找未使用的函數(shù)方法是:
巴楚網(wǎng)站建設公司創(chuàng)新互聯(lián)公司,巴楚網(wǎng)站設計制作,有大型網(wǎng)站制作公司豐富經(jīng)驗。已為巴楚千余家提供企業(yè)網(wǎng)站建設服務。企業(yè)網(wǎng)站搭建\外貿(mào)營銷網(wǎng)站建設要多少錢,請找那個售后服務好的巴楚做網(wǎng)站的公司定做!
1、在VS.NET中右鍵單擊主RESX文件,然后從上下文菜單中選擇FindUsages。
2、雙擊解決方案窗口中的每個匹配項,這將打開包含該資源的源代碼窗口。
3、在源代碼窗口中重命名此資源,它將彈出ReSharper的“重命名資源”對話框。
4、它將重命名資源和自動生成的C#包裝器/訪問類。
5、對"Usages“窗口中的所有資源重復上述步驟2、3和4。
6、在VisualStudio的資源編輯器中打開RESX文件,并選擇所有不帶前綴的文件。
7、您最終得到了一個RESX文件,其中有未使用的函數(shù)。
步驟如下:
窗體上添加2個列表框,一個按鈕:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim MyDir As String = "C:\123"
'搜索并顯示子文件夾
ListBox1.Items.Clear()
For Each MySubDir As String In System.IO.Directory.GetDirectories(MyDir)
ListBox1.Items.Add(MySubDir)
Next
'搜索并顯示文件
ListBox2.Items.Clear()
For Each MyFile As String In System.IO.Directory.GetFiles(MyDir)
ListBox2.Items.Add(MyFile)
Next
End Sub
End Class
vb.net編程查找搜索指定目錄下面的所有文件和其子目錄下的文件,方法如下:
''=============================================
''名稱:?FindPath
''作用:?查找搜索指定目錄下面的所有文件和其子目錄下的文件
''參數(shù):strPath?要查找的目錄,
''strFiles?用于存查找結(jié)果的緩沖區(qū),String?類型的動態(tài)數(shù)組,調(diào)用時事先初始化,?如Redim?strFiles(0)
''FileCount?用于返回文件個數(shù)
''=============================================
Public?Sub?FindPath(ByVal?strPath?As?String,?strFiles()?As?String,?FileCount?As?Long)
Dim?strDirs()???As?String
Dim?strResult???As?String
Dim?FileLimit???As?Long
Dim?dirLimit????As?Long
Dim?dirCount????As?Long
Dim?I???????????As?Long
FileLimit?=?UBound(strFiles)?+?1
dirLimit?=?0
If?Right$(strPath,?1)??"/"?Then?strPath?=?strPath??"/"
strResult?=?Dir(strPath,?vbDirectory?+?vbSystem?+?vbReadOnly?+?vbHidden?+?vbNormal?+?vbArchive)
Do?While?Len(strResult)??0
If?strResult??"."?And?strResult??".."?Then
If?(GetAttr(strPath??strResult)?And?vbDirectory)??vbDirectory?Then
If?FileCount?=?FileLimit?Then
ReDim?Preserve?strFiles(FileLimit?+?10)
FileLimit?=?FileLimit?+?10
End?If
strFiles(FileCount)?=?strPath??strResult
FileCount?=?FileCount?+?1
Else
If?dirCount?=?dirLimit?Then
ReDim?Preserve?strDirs(dirLimit?+?10)
dirLimit?=?dirLimit?+?10
End?If
strDirs(dirCount)?=?strPath??strResult
dirCount?=?dirCount?+?1
End?If
End?If
strResult?=?Dir(,?vbDirectory?+?vbSystem?+?vbReadOnly?+?vbHidden?+?vbNormal?+?vbArchive)
Loop
For?I?=?0?To?dirCount?-?1
Call?FindPath(strDirs(I),?strFiles,?FileCount)
Next?I
End?Sub
窗體上添加一個文本框,一個列表框,一個按鈕:
代碼如下:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim MyDir As String = "C:\123"
Dim MyFilter As String = "*" TextBox1.Text "*"
ListBox1.Items.Clear()
For Each MyFile As String In System.IO.Directory.GetFiles(MyDir, MyFilter)
ListBox1.Items.Add(MyFile)
Next
End Sub
網(wǎng)站名稱:vb.net搜索 vb數(shù)據(jù)庫查詢
轉(zhuǎn)載來于:http://jinyejixie.com/article0/hpdsio.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站改版、定制開發(fā)、網(wǎng)站維護、全網(wǎng)營銷推廣、網(wǎng)站收錄、網(wǎng)站設計公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)