av激情亚洲男人的天堂国语,日韩欧美精品一中文字幕,无码av一区二区三区无码,国产又色又爽又刺激的a片,国产又色又爽又刺激的a片

輕松打造VB.NET文件合并示例

VB.NET編程語言在文件的操作方面體現(xiàn)了非常大的作用。比如今天要為大家介紹的VB.NET文件合并,就可以應(yīng)用VB.NET來輕松的實(shí)現(xiàn)。大家就一起來具體的解讀這段代碼來對此進(jìn)行一個(gè)詳細(xì)的了解。

成都創(chuàng)新互聯(lián)服務(wù)項(xiàng)目包括武陵源網(wǎng)站建設(shè)、武陵源網(wǎng)站制作、武陵源網(wǎng)頁制作以及武陵源網(wǎng)絡(luò)營銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,武陵源網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到武陵源省份的部分城市,未來相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!

VB.NET文件合并代碼實(shí)現(xiàn)示例:

 
 
 
  1. Private Sub MergeFiles(ByVal 
    inputDir As String, ByVal 
    inputMask As String, ByVal 
    outputPath As String)  
  2. 'store files in datatable 
    with their created times 
    to sort by later  
  3. Dim files As New DataTable  
  4. files.Columns.Add("filepath",
     GetType(String))  
  5. files.Columns.Add("creationtime",
     GetType(Date))  
  6. 'find partial files  
  7. For Each f As String In IO.
    Directory.GetFiles(inputDir, inputMask)  
  8. files.Rows.Add(New Object() 
    {f, IO.File.GetCreationTime(f)})  
  9. Next  
  10. 'make sure output file does
     not exist before writing  
  11. If IO.File.Exists(outputPath) Then  
  12. IO.File.Delete(outputPath)  
  13. End If  
  14. 'loop through file in order, 
    and append contents to output file  
  15. For Each dr As DataRow In 
    files.Select("", "creationtime")  
  16. Dim contents As String = 
    My.Computer.FileSystem.ReadAllText
    (CStr(dr("filepath")))  
  17. My.Computer.FileSystem.WriteAllText
    (outputPath, contents, True)  
  18. Next  
  19. End Su 

 VB.NET文件合并的相關(guān)實(shí)現(xiàn)方法就為大家介紹到這里。

【編輯推薦】

  1. VB.NET水晶報(bào)表優(yōu)點(diǎn)及結(jié)果描述
  2. VB.NET指針在實(shí)際應(yīng)用中作用體現(xiàn)
  3. VB.NET List實(shí)用技巧詳解
  4. VB.NET文件名排序輕松掌握
  5. VB.NET IEnumerator接口操作代碼解讀

分享標(biāo)題:輕松打造VB.NET文件合并示例
當(dāng)前地址:http://uogjgqi.cn/article/dpjdgei.html
掃二維碼與項(xiàng)目經(jīng)理溝通

我們在微信上24小時(shí)期待你的聲音

解答本文疑問/技術(shù)咨詢/運(yùn)營咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流