TextFieldParser 物件提供簡便且有效的方式來剖析結構化的文字檔,例如記錄檔。
TextFieldType 屬性 (Property) 會定義檔案是否為分隔的檔案,或是具有固定寬度文字欄位的檔案。若要在固定寬度的檔案中指定可變動寬度的欄位,請將欄位寬度定義為 -1。
Posted by minying 於 1 十二月, 2008
TextFieldParser 物件提供簡便且有效的方式來剖析結構化的文字檔,例如記錄檔。
TextFieldType 屬性 (Property) 會定義檔案是否為分隔的檔案,或是具有固定寬度文字欄位的檔案。若要在固定寬度的檔案中指定可變動寬度的欄位,請將欄位寬度定義為 -1。
Posted in VB.NET | 已加上的標籤: VB.NET | Leave a Comment »
Posted by minying 於 1 十二月, 2008
TextFieldParser 物件提供簡便且有效的方式來剖析結構化的文字檔,例如記錄檔。TextFieldType 屬性 (Property) 會定義檔案是否為分隔的檔案,或是具有固定寬度文字欄位的檔案。
Posted in VB.NET | 已加上的標籤: VB.NET | Leave a Comment »
Posted by minying 於 1 十二月, 2008
My.Computer.FileSystem 物件的 ReadAllText 方法允許您從文字檔讀取。如果檔案的內容是使用 ASCII 或 UTF-8 之類的編碼方式,則可以指定檔案編碼方式。
如果您是從含擴充字元的檔案讀取,您將需要指定檔案的編碼方式。
Posted in VB.NET | 已加上的標籤: VB.NET | Leave a Comment »
Posted by minying 於 1 十二月, 2008
如何過濾重複的陣列元素
<< VB.Net 2005 >> 和<< VB.Net 2008 >> 的寫法!!
<< VB.Net 2005 >>
Private Sub Button1_Click(ByVal s As Object, ByVal e As EventArgs) Handles Button1.Click
‘ 一整數陣列
Dim ary() As Integer = {1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3}
ary = DistinctArray(ary) ‘ 過濾重複的陣列元素
For Each i As Integer In ary ‘ 底下顯示過濾後的陣列
MessageBox.Show(i)
Next
End Sub
Posted in VB.NET | 已加上的標籤: VB.NET | Leave a Comment »
Posted by minying 於 1 十二月, 2008
This page contains sample ADO connection strings for ODBC DSN / DSN-Less, OLE DB Providers, Remote Data Services (RDS), MS Remote, and MS DataShape.Also included are ADO.NET connection strings for MySQL, ODBC, OLE DB, Oracle, and SQL Server .NET Data Providers.
These sample connection strings are compiled by Carl Prothman, a Microsoft ASP.NET MVP and Microsoft Certified Professional (MCP)
If you have an ADO or ADO.NET connection string that is not listed below, or you see an connection string that does not have the correct setting, please send an email to Carl Prothman. Thanks!
Posted in VB.NET | 已加上的標籤: ADO.NET, VB.NET | Leave a Comment »