Development Blog : C# Code Samples,.NET Tips and Tricks
Archivio di marzo, 2010
Internet Explorer 9 Platform Preview
01 year ago un anno fà
Scritto da Luigi Melisi
in Intenet Explorer 9
Questa settimana è stata rilasciata la prima Platform Preview di IE9, dedicata agli sviluppatori, scaricabile da qui e installabile side-by-side a una precedente versione di IE.
Molte delle novità di Internet Explorer 9 trarranno vantaggio dalla maggiore potenza di calcolo delle CPU e GPU oggi presenti sui computer moderni: un nuovo motore compilerà il JavaScript con un thread in background ottimizzando le applicazioni web che ne fanno sempre più uso. (continua…)
[VB.NET] : Popolare una DataTable con un file CVS
01 year ago un anno fà
Scritto da Luigi Melisi
in Tips and Tricks
Di seguito un semplice esempio che mostra come popolare un DataTable utilizzando Vb.Net :
Function ReadCSV(ByVal path As String) As System.Data.DataTable
Dim sr As New StreamReader(path)
Dim fullFileStr As String = sr.ReadToEnd()
sr.Close()
sr.Dispose()
Dim lines As String() = fullFileStr.Split(ControlChars.Lf)
Dim recs As New DataTable()
Dim sArr As String() = lines(0).Split(","c)
For Each s As String In sArr
recs.Columns.Add(New DataColumn())
Next
Dim row As DataRow
Dim finalLine As String = ""
For Each line As String In lines
row = recs.NewRow()
finalLine = line.Replace(Convert.ToString(ControlChars.Cr), "")
row.ItemArray = finalLine.Split(","c)
recs.Rows.Add(row)
Next
Return recs
End Function</pre>
[VB.NET] : Accesso in lettura ad una DataTable
01 year ago un anno fà
Scritto da Luigi Melisi
in Tips and Tricks
1 2 3 4 5 6 7 | Function ReadAccess(ByVal sqlString As String, ByVal path As String) As System.Data.DataTable Dim strConn As String = _"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & path & ";" Dim recs As New Data.DataTable() DIm sql As New OleDbDataAdapter(sqlString, strConn) sql.Fill(recs) Return recs End Function |
[VB.NET] : Individuare tutte le stampanti installate
01 year ago un anno fà
1 2 3 4 5 6 7 | Protected Overrides Sub ChargeImpresoras() Dim lPrintDoc As New Printing.PrintDocument Dim lPrinter As Object For Each lPrinter In PrinterSettings.InstalledPrinters cboPrinters.Items.Add(lPrinter) Next End Sub |
![YouBuy.it - Last Minute - Offerte Sottocosto last [VB.NET] : Inviare una mail in formato HTML](http://images.youbuy.it/adv/last.jpg)