<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Visual Basic .Net</title>
        <link>http://blogs.ugidotnet.org/PietroLibroBlog/category/2724.aspx</link>
        <description>Visual Basic .Net</description>
        <language>it-IT</language>
        <copyright>Pietro Libro</copyright>
        <generator>Subtext Version 2.1.0.5</generator>
        <item>
            <title>RegexStringValidator</title>
            <link>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/09/17/94060.aspx</link>
            <description>&lt;p&gt;Con la versione 2.0 del .Net Framework è stata aggiunta al namespace &lt;em&gt;System.Configuration&lt;/em&gt;, la classe &lt;em&gt;RegexStringValidator&lt;/em&gt; che permette di eseguire rapidatamente la validazione di stringhe utilizzando espressioni regolari. Supponendo di avere un'espressione del tipo &lt;em&gt;^\d+,\d{2}$&lt;/em&gt;, che permette di verificare se una stringa rappresenta un valore numerico con due cifre dopo la virgola, per validare una stringa, possiamo scrivere una funzione molto semplice:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:4c218f6d-ddec-48e3-953f-e564248760df" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;;overflow: auto;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #008080;"&gt; 1&lt;/span&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Private&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Function&lt;/span&gt;&lt;span style="color: #000000;"&gt; IsValid(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;ByVal&lt;/span&gt;&lt;span style="color: #000000;"&gt; value &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;As&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;String&lt;/span&gt;&lt;span style="color: #000000;"&gt;) &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;As&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Boolean&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 2&lt;/span&gt; &lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 3&lt;/span&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Dim&lt;/span&gt;&lt;span style="color: #000000;"&gt; regexValidator &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;As&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;New&lt;/span&gt;&lt;span style="color: #000000;"&gt; RegexStringValidator(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;^\d+,\d{2}$&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;)
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 4&lt;/span&gt; &lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 5&lt;/span&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Try&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 6&lt;/span&gt; &lt;span style="color: #000000;"&gt;            regexValidator.Validate(value)
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 7&lt;/span&gt; &lt;span style="color: #000000;"&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Return&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;True&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 8&lt;/span&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Catch&lt;/span&gt;&lt;span style="color: #000000;"&gt; ex &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;As&lt;/span&gt;&lt;span style="color: #000000;"&gt; ArgumentException
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 9&lt;/span&gt; &lt;span style="color: #000000;"&gt;            &lt;/span&gt;&lt;span style="color: #008000;"&gt;'&lt;/span&gt;&lt;span style="color: #008000;"&gt;E'possibile sfruttuare l'istanza di ArgumentException per &lt;/span&gt;&lt;span style="color: #008000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;10&lt;/span&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;            &lt;/span&gt;&lt;span style="color: #008000;"&gt;'&lt;/span&gt;&lt;span style="color: #008000;"&gt;ottenere maggiori informazioni sull'eccezione&lt;/span&gt;&lt;span style="color: #008000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;11&lt;/span&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Return&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;False&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;12&lt;/span&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;End&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Try&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;13&lt;/span&gt; &lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;14&lt;/span&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;End Function&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Utilizzando il metodo &lt;em&gt;classico&lt;/em&gt;, avremmo potuto scrivere:&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:ab2ebcbf-4a5c-42f9-8419-467fc03b0340" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;;overflow: auto;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #008080;"&gt;1&lt;/span&gt; &lt;span style="color: #0000FF;"&gt;Dim&lt;/span&gt;&lt;span style="color: #000000;"&gt; regex &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;As&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;New&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Text.RegularExpressions.Regex(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;^\d+,\d{2}$&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;)
&lt;/span&gt;&lt;span style="color: #008080;"&gt;2&lt;/span&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Dim&lt;/span&gt;&lt;span style="color: #000000;"&gt; match &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;As&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Text.RegularExpressions.Match &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; regex.Match(&lt;/span&gt;&lt;span style="color: #800000;"&gt;""&lt;/span&gt;&lt;span style="color: #000000;"&gt;)
&lt;/span&gt;&lt;span style="color: #008080;"&gt;3&lt;/span&gt; &lt;span style="color: #000000;"&gt;MessageBox.Show(match.Success)&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;

&lt;p&gt;Un'osservazione: Per verificare che un oggetto possa essere validato utilizzando &lt;em&gt;RegexStringValidator&lt;/em&gt;, è sufficiente utilizzare il metodo d'istanza &lt;em&gt;CanValidate&lt;/em&gt; della classe.&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e179058c-e18c-4f0b-9053-505394596bfa" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tag: &lt;a href="http://technorati.com/tags/RegexStringValidator" rel="tag"&gt;RegexStringValidator&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/PietroLibroBlog/aggbug/94060.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Pietro Libro</dc:creator>
            <guid>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/09/17/94060.aspx</guid>
            <pubDate>Wed, 17 Sep 2008 08:00:58 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/09/17/94060.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/PietroLibroBlog/comments/commentRss/94060.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/PietroLibroBlog/services/trackbacks/94060.aspx</trackback:ping>
        </item>
        <item>
            <title>DataTable.RowChanged e ProgressBar</title>
            <link>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/02/13/91175.aspx</link>
            <description>&lt;p&gt;Se abbiamo bisogno di una soluzione veloce per visualizzare l'avanzamento di un controllo ProgressBar durante il caricamento di un DataTable, possiamo gestire l'evento &lt;em&gt;RowChanded &lt;/em&gt;in questo modo:&lt;/p&gt;  &lt;p&gt;   &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:9e283011-ed26-4b51-b6bf-77d44ef58e08" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;;overflow: auto;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #008080;"&gt;1&lt;/span&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Private&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Sub&lt;/span&gt;&lt;span style="color: #000000;"&gt; CustomRowChanged(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;ByVal&lt;/span&gt;&lt;span style="color: #000000;"&gt; sender &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;As&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Object&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;ByVal&lt;/span&gt;&lt;span style="color: #000000;"&gt; e &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;As&lt;/span&gt;&lt;span style="color: #000000;"&gt; DataRowChangeEventArgs)
&lt;/span&gt;&lt;span style="color: #008080;"&gt;2&lt;/span&gt; &lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;3&lt;/span&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;If&lt;/span&gt;&lt;span style="color: #000000;"&gt; (e.Action &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; DataRowAction.Commit) &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Then&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;4&lt;/span&gt; &lt;span style="color: #000000;"&gt;            &lt;/span&gt;&lt;span style="color: #008000;"&gt;'&lt;/span&gt;&lt;span style="color: #008000;"&gt;Avanziamo il valore della progress bar&lt;/span&gt;&lt;span style="color: #008000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;5&lt;/span&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;            ProgressBar1.Value &lt;/span&gt;&lt;span style="color: #000000;"&gt;+=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;1&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;6&lt;/span&gt; &lt;span style="color: #000000;"&gt;            Application.DoEvents()
&lt;/span&gt;&lt;span style="color: #008080;"&gt;7&lt;/span&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;End&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;If&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;8&lt;/span&gt; &lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;9&lt;/span&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;End Sub&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;


&lt;p&gt;Il codice per popolare il DataTable con i dati e per registrare il gestore eventi personalizzato può essere del tipo:&lt;/p&gt;

&lt;p&gt;
  &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:5e7d92c5-8f36-45f4-a4fe-a214e87f0e15" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;;overflow: auto;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #008080;"&gt; 1&lt;/span&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;'&lt;/span&gt;&lt;span style="color: #008000;"&gt;Imposto la proprietà Maximux del controllo ProgressBar&lt;/span&gt;&lt;span style="color: #008000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 2&lt;/span&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        ProgressBar1.Value &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 3&lt;/span&gt; &lt;span style="color: #000000;"&gt;        ProgressBar1.Maximum &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; GetNumeroRecords()
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 4&lt;/span&gt; &lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 5&lt;/span&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;'&lt;/span&gt;&lt;span style="color: #008000;"&gt;Registro il gestore eventi personalizzato&lt;/span&gt;&lt;span style="color: #008000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 6&lt;/span&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;AddHandler&lt;/span&gt;&lt;span style="color: #000000;"&gt; Articoli.ArticoliDataTable.RowChanged, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;AddressOf&lt;/span&gt;&lt;span style="color: #000000;"&gt; CustomRowChanged
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 7&lt;/span&gt; &lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 8&lt;/span&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Try&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 9&lt;/span&gt; &lt;span style="color: #000000;"&gt;            DataGridView1.SuspendLayout()
&lt;/span&gt;&lt;span style="color: #008080;"&gt;10&lt;/span&gt; &lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;11&lt;/span&gt; &lt;span style="color: #000000;"&gt;            &lt;/span&gt;&lt;span style="color: #008000;"&gt;'&lt;/span&gt;&lt;span style="color: #008000;"&gt;Popolo il DataTable &lt;/span&gt;&lt;span style="color: #008000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;12&lt;/span&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;            ArticoliTableAdapter.Fill(Articoli.ArticoliDataTable)
&lt;/span&gt;&lt;span style="color: #008080;"&gt;13&lt;/span&gt; &lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;14&lt;/span&gt; &lt;span style="color: #000000;"&gt;            MessageBox.Show(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;String&lt;/span&gt;&lt;span style="color: #000000;"&gt;.Format(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;Caricati {0} records&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;,Articoli.ArticoliDataTable.Rows.Count))
&lt;/span&gt;&lt;span style="color: #008080;"&gt;15&lt;/span&gt; &lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;16&lt;/span&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Catch&lt;/span&gt;&lt;span style="color: #000000;"&gt; ex &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;As&lt;/span&gt;&lt;span style="color: #000000;"&gt; Exception
&lt;/span&gt;&lt;span style="color: #008080;"&gt;17&lt;/span&gt; &lt;span style="color: #000000;"&gt;            MessageBox.Show(ex.Message)
&lt;/span&gt;&lt;span style="color: #008080;"&gt;18&lt;/span&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Finally&lt;/span&gt;&lt;span style="color: #000000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;19&lt;/span&gt; &lt;span style="color: #000000;"&gt;            DataGridView1.ResumeLayout()
&lt;/span&gt;&lt;span style="color: #008080;"&gt;20&lt;/span&gt; &lt;span style="color: #000000;"&gt;            &lt;/span&gt;&lt;span style="color: #008000;"&gt;'&lt;/span&gt;&lt;span style="color: #008000;"&gt;Rimuovo l'handler...&lt;/span&gt;&lt;span style="color: #008000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;21&lt;/span&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;RemoveHandler&lt;/span&gt;&lt;span style="color: #000000;"&gt; Articoli.ArticoliDataTable.RowChanged, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;AddressOf&lt;/span&gt;&lt;span style="color: #000000;"&gt; CustomRowChanged
&lt;/span&gt;&lt;span style="color: #008080;"&gt;22&lt;/span&gt; &lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;End&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;Try&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;


&lt;p&gt;Ovviamente si potrebbero usare modelli di programmazione asincrona o popolare dati mediante un thread diverso da quello principale.&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e48dcc0f-320d-4a32-b7b4-7c230f0136da" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tag: &lt;a href="http://technorati.com/tags/DataTable.RowChanged%20Event" rel="tag"&gt;DataTable.RowChanged Event&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/PietroLibroBlog/aggbug/91175.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Pietro Libro</dc:creator>
            <guid>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/02/13/91175.aspx</guid>
            <pubDate>Wed, 13 Feb 2008 16:00:29 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/02/13/91175.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/PietroLibroBlog/comments/commentRss/91175.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/PietroLibroBlog/services/trackbacks/91175.aspx</trackback:ping>
        </item>
        <item>
            <title>Windows Form, thread ed eccezioni</title>
            <link>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/02/03/90987.aspx</link>
            <description>&lt;p&gt;Supponiamo di avere una semplice applicazione Windows Form il cui unico (e stupido) compito è quello di eseguire una divisione, qualcosa  del tipo&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/PietroLibroBlog/WindowsLiveWriter/WindowsFormthreadedeccezioni_A6FC/Img_1.jpg"&gt;&lt;img width="151" height="134" border="0" style="border-width: 0px;" alt="Img_1" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/PietroLibroBlog/WindowsLiveWriter/WindowsFormthreadedeccezioni_A6FC/Img_1_thumb.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="justify"&gt;Se non eseguiamo nessuna validazione sui campi, potrebbe accadere che vengano eseguiti calcoli sbagliati (ad esempio una divisione per zero)  e di conseguenza che vengano sollevate le corrispondenti eccezioni. Per catturarle, possiamo utilizzare dei blocchi&lt;em&gt; Try...Catch...Finally&lt;/em&gt; oppure  gestire l'evento &lt;em&gt;Application.ThreadException&lt;/em&gt;. Così facendo, oltre alla possibilità di memorizzare un log delle eccezioni a livello di applicazione o eseguire del codice di pulizia, possiamo visualizzare una Windows Form &lt;em&gt;User-Friendly&lt;/em&gt;, senza interrompere bruscamente l'applicazione. Per registrare il gestore  dell'evento &lt;em&gt;ThreadException&lt;/em&gt;, possiamo aggiungere un modulo al nostro progetto e scrivere il seguente codice:&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:e1f4ff5a-a087-4220-8d31-98407612362d" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;
&lt;pre style="overflow: auto; background-color: White; white-space: -moz-pre-wrap;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 1&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;STAThread()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; _&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 2&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Sub&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Main()&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 3&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 4&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Imposta il gestore evento Application.ThreadExeception personalizzato&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 5&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;AddHandler&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Application.ThreadException, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;AddressOf&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; CustomErrorHandler&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 6&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 7&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;AddHandler&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; AppDomain.CurrentDomain.UnhandledException, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;AddressOf&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; AppDomainCustomErrorHandler&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 8&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 9&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Imposta il gestore evento Application.ApplicationExit personalizzato&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;10&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;AddHandler&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Application.ApplicationExit, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;AddressOf&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; CustomApplicationExit&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;11&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;12&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;        Application.Run(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;New&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Form1())&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;13&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;End Sub&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p&gt;Dove il gestore &lt;em&gt;CustomErrorHandler&lt;/em&gt; è del tipo:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:12c908bb-edbd-4359-b302-fdcae477c2b8" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;
&lt;pre style="overflow: auto; background-color: White; white-space: -moz-pre-wrap;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 1&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Sub&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; CustomErrorHandler(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;ByVal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; sender &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Object&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;ByVal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; e &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Threading.ThreadExceptionEventArgs)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 2&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 3&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Try&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 4&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Gestisce l'eccezione visualizzando una finestra di dialogo comune per l'eventuali eccezioni&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 5&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            My.Forms.frmExeception.DescrizioneEccezione &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; e.Exception.Message&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 6&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;            My.Forms.frmExeception.ShowDialog()&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 7&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Catch&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ex &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Exception&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 8&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 9&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;End&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Try&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;10&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;11&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;End Sub&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Il quale, in caso di eccezione, visualizza la seguente finestra di dialogo:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/PietroLibroBlog/WindowsLiveWriter/WindowsFormthreadedeccezioni_A6FC/Img_2.jpg"&gt;&lt;img width="244" height="126" border="0" style="border-width: 0px;" alt="Img_2" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/PietroLibroBlog/WindowsLiveWriter/WindowsFormthreadedeccezioni_A6FC/Img_2_thumb.jpg" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="justify"&gt;Nel &lt;em&gt;Sub Main&lt;/em&gt;, oltre a registrare l'evento &lt;em&gt;Application.ThreadException&lt;/em&gt;, viene registrato anche il gestore per l'evento &lt;em&gt;AppDomain.CurrentDomain.UnhandledExecption&lt;/em&gt;, perchè nel in cui caso la nostra applicazione sfrutti il multithreading, l'eventuali eccezioni dovute ai thread secondari non sarebbero catturate da &lt;em&gt;CustomErrorHandler&lt;/em&gt;. Il codice del gestore per l'evento &lt;em&gt;AppDomain.CurrrentDomain.UnhandledException&lt;/em&gt; è il seguente:&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:3ece1029-72c0-4862-b3be-676dd3892d85" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;
&lt;pre style="overflow: auto; background-color: White; white-space: -moz-pre-wrap;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 1&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;Public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Sub&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; AppDomainCustomErrorHandler(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;ByVal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; sender &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Object&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;ByVal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; e &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; UnhandledExceptionEventArgs)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 2&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Try&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 3&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Gestisce l'eccezione visualizzando una finestra di dialogo comune per l'eventuali eccezioni&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 4&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Ottiene l'oggetto Exception&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 5&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Dim&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; appDomainException &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Exception &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;DirectCast&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(e.ExceptionObject, System.Exception)            &lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 6&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;            My.Forms.frmExeception.DescrizioneEccezione &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; appDomainException.Message&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 7&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;            My.Forms.frmExeception.ShowDialog()&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 8&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 9&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;If&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (e.IsTerminating) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Then&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;10&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;                &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Operazioni di pulizia...&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;11&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;End&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;If&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;12&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Catch&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ex &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Exception&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;13&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;14&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;End&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Try&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;15&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;End Sub&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p align="justify"&gt;Il quale esegue una cast dell'oggetto&lt;em&gt; e.ExceptionObject&lt;/em&gt; in &lt;em&gt;System.Exception&lt;/em&gt; e visualizza la finestra di dialogo su mostrata. L'istanza di oggetto &lt;em&gt;UnhandledExecptionEventArgs&lt;/em&gt; espone la proprietà &lt;em&gt;IsTerminating&lt;/em&gt; che indica se il common language runtime stà terminando o meno. Nel caso di &lt;em&gt;UnhandledExecption&lt;/em&gt;, il .Net Framework , con o senza gestione del relativo evento, visualizza la classica finestra di dialogo per l'esecuzione del debug  dell'applicazione. Per testare il codice ed il relativo comportamento dell'applicazione, da Visual Studio è necessario lanciare l'applicazione  senza Debug.&lt;/p&gt;
&lt;a title="Codice Sorgente Esempio" target="_blank" href="http://www.pietrolibro.name/sources/Thread Exception.zip"&gt;Thread Exception.zip&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8edd1700-5b3f-4701-99dd-4216c586dd78" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;Technorati Tag: &lt;a href="http://technorati.com/tags/Application.ThreadException" rel="tag"&gt;Application.ThreadException&lt;/a&gt;,&lt;a href="http://technorati.com/tags/UnhandledException" rel="tag"&gt;UnhandledException&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/PietroLibroBlog/aggbug/90987.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Pietro Libro</dc:creator>
            <guid>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/02/03/90987.aspx</guid>
            <pubDate>Sun, 03 Feb 2008 11:26:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/02/03/90987.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/PietroLibroBlog/comments/commentRss/90987.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/PietroLibroBlog/services/trackbacks/90987.aspx</trackback:ping>
        </item>
        <item>
            <title>Operazione cross-thread non valida...</title>
            <link>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/02/01/90968.aspx</link>
            <description>&lt;p&gt;Post nato da una discussione su forum. Se utilizziamo un componente Backgroundworker per l'esecuzione di codice in    &lt;br /&gt;
background, bisogna stare attenti alle operazioni "cross-thread", ad esempio quando il codice interagisce con i controlli    &lt;br /&gt;
di una Windows Form. Se abbiamo ad esempio un controllo ListView, per popolarlo senza provocare eccezioni durante     &lt;br /&gt;
l'esecuzione dell'applicazione, possiamo costruire ed utilizzare un delegate come nel codice seguente:&lt;/p&gt;
&lt;p&gt;   &lt;/p&gt;
&lt;div style="margin: 0px; padding: 0px; display: inline; float: none;" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:cfc4e852-0afb-4545-8deb-9476326249e2" class="wlWriterEditableSmartContent"&gt;
&lt;pre style="overflow: auto; background-color: White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Private&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Delegate&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Sub&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ScriviSuListViewDelegate()&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Private&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Sub&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; BackgroundWorker1_DoWork(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;ByVal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; sender &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Object, _&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;   ByVal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; e &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.ComponentModel.DoWorkEventArgs) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Handles&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; BackgroundWorker1.DoWork&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;   If&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Not&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (ListView1.InvokeRequired)) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Then&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;      For&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; i &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;To&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;20&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;         ListView1.Items.Add(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;String&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.Format(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Item #{0}&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, i))&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;      Next&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;   Else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;      Dim&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; d &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;New&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ScriviSuListViewDelegate(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;AddressOf&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ScriviSuListiView)&lt;br /&gt;      ListView1.Invoke(d)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;   End&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;If&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;End Sub&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;div style="margin: 0px; padding: 0px; display: inline;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:025e2983-e89a-4dbc-bbd0-32d629f87d55" class="wlWriterEditableSmartContent"&gt;Technorati Tag: &lt;a rel="tag" href="http://technorati.com/tags/BackgroundWorker"&gt;BackgroundWorker&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/PietroLibroBlog/aggbug/90968.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Pietro Libro</dc:creator>
            <guid>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/02/01/90968.aspx</guid>
            <pubDate>Fri, 01 Feb 2008 11:51:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/02/01/90968.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/PietroLibroBlog/comments/commentRss/90968.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/PietroLibroBlog/services/trackbacks/90968.aspx</trackback:ping>
        </item>
        <item>
            <title>Interfaccia ISerializable e Serializzazioni Custom</title>
            <link>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/01/22/90807.aspx</link>
            <description>&lt;p&gt;Implementando l'interfaccia ISerializable nelle nostre classi, possiamo personalizzare il processo di serializzazione/deserializzazone dei tipi.    &lt;br /&gt;
Ad esempio, un istanza di oggetto potrebbe contenere dei dati (ad esempio una password) che non vogliamo che risulti visibile     &lt;br /&gt;
tramite editor di testo (come notepad) dopo aver serializzato l'oggetto come file su disco.    &lt;br /&gt;
Nel codice di esempio  è presente una classe Persona  (onnipresente :-) ),  che implementa il metodo GetObjectData (per la fase di serializzazione) con il codice necessario a cifrare il valore del campo "password", ed il costruttore con opportuna firma (per la fase di deserializzazione) nel quale viene decifrato il valore da attribuire al campo "password" dell'oggetto. Ovviamente i metodi utilizzati per cifrare/decifrare il testo dell'esempio sono banali     &lt;br /&gt;
e non usabili nel mondo reale. Nel codice della classe, sono presenti due metodi, contrassegnati dagli attributi OnSerialized ed     &lt;br /&gt;
OnDeserialized che permettono d'intercettare rispettivamente la fine del processo di serializzazione e di deserializzazione.     &lt;br /&gt;
E' possibile intercettare l'inizio delle operazioni di serializzazione e di deserializzazione tramite gli attributi OnSerializing e OnDeserializing.     &lt;br /&gt;
I metodi che intercettano gli eventi di serializzazione devono accettare un unico parametro di tipo StreamingContext, devono "ritornare Void" e     &lt;br /&gt;
devono essere contrassegnati dall'attributo che corrisponde con l'evento che vogliamo intercettare.     &lt;br /&gt;
Il codice "principale" della classe "Persona" è il seguente (in fondo al post è presente il collegamento per eseguire il download dell'     &lt;br /&gt;
intero codice) &lt;/p&gt;
&lt;p&gt;   &lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:c96ecb08-14e6-4408-b9ca-78b8e4723c9b" style="margin: 0px; padding: 0px; display: inline; float: none; width: 276px;"&gt;
&lt;pre style="overflow: auto; background-color: White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'Classe serializzabile&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;Serializable()&amp;gt; _&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;Class&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Persona&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Implements&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Runtime.Serialization.ISerializable&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;  '...definizione campi privati e proprietà&lt;/span&gt; &lt;br /&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;  'Costruttore senza parametri&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;  Public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Sub&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;New&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;End Sub&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;    'In fase di deserializzazone, viene invocato questo costruttore dopo che  il formattatore&lt;br /&gt;  'ha deserializzato i dati dell'oggetto SerializationInfo.&lt;/span&gt;   &lt;span style="color: rgb(0, 0, 255);"&gt;Protected&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Sub&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;New&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;ByVal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; info &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; SerializationInfo, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;ByVal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; context &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; StreamingContext)&lt;br /&gt;    _nome = info.GetString(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"nome"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;    _cognome = info.GetString(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"cognome"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;    _username = info.GetString(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"username"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;    'Recupera la password decifrandola&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    _password = OttieniTestoInChiaro(info.GetString(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"password"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;))&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;  End Sub&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'In fase di serializzazione, l'oggetto Formatter richiama questo metodo per popolare la classe&lt;br /&gt;  'SerializationInfo con i dati necessari alla rappresentazione dell'oggetto&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;  Public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Sub&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; GetObjectData(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;ByVal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; info &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; SerializationInfo, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;ByVal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; context &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; StreamingContext) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Implements&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Runtime.Serialization.ISerializable.GetObjectData&lt;br /&gt;    info.AddValue(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"nome"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, _nome)&lt;br /&gt;    info.AddValue(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"cognome"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, _cognome)&lt;br /&gt;    info.AddValue(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"username"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, _username)&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'La password non deve essere in chiaro&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    info.AddValue(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"password"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, OttieniTestoCifrato(_password))&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;  End Sub&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;   &amp;lt;OnSerialized()&amp;gt; _ &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;  Private&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Sub&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; OnSerialized(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;ByVal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; context &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; StreamingContext)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;    'Ricorda che l'oggetto è stato serializzato&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    _serializzato = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;True&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;  End Sub&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;   &amp;lt;OnDeserialized()&amp;gt; _   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Private&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Sub&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; OnDeserialized(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;ByVal&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; context &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; StreamingContext)&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'L'oggetto è stato deserializzato, quindi imposta a False la proprietà Serializzato&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    _serializzato = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;False&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;End Sub&lt;/span&gt;&lt;span class="style1"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'...altro codice&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;End Class&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://www.pietrolibro.name/sources/persona.txt" target="_blank"&gt;Codice della classe "Persona"&lt;/a&gt;&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:493c81b8-f8ad-4841-aac2-69f84d47ed93" style="margin: 0px; padding: 0px; display: inline;"&gt;Technorati Tag: &lt;a href="http://technorati.com/tags/ISerialization" rel="tag"&gt;ISerialization&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/PietroLibroBlog/aggbug/90807.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Pietro Libro</dc:creator>
            <guid>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/01/22/90807.aspx</guid>
            <pubDate>Tue, 22 Jan 2008 10:19:12 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/01/22/90807.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/PietroLibroBlog/comments/commentRss/90807.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/PietroLibroBlog/services/trackbacks/90807.aspx</trackback:ping>
        </item>
        <item>
            <title>Report Locali &amp;amp; Parametri</title>
            <link>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/01/10/90645.aspx</link>
            <description>&lt;p&gt;Spesso mi capita di leggere nei forum domande relative all'utilizzo dei parametri nei report locali. Sperando che il progetto possa essere di aiuto, un esempio concreto per la visualizzazione di stringhe ed immagini.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/PietroLibroBlog/WindowsLiveWriter/ReportLocaliParametri_147BD/ReportParameter.jpg"&gt;&lt;img width="244" height="175" border="0" style="border: 0px none ;" alt="ReportParameter" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/PietroLibroBlog/WindowsLiveWriter/ReportLocaliParametri_147BD/ReportParameter_thumb.jpg" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.redangel.it/click_file.asp?m=1964&amp;amp;l=13" target="_blank"&gt;Codice sorgente progetto&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/PietroLibroBlog/aggbug/90645.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Pietro Libro</dc:creator>
            <guid>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/01/10/90645.aspx</guid>
            <pubDate>Thu, 10 Jan 2008 22:20:56 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/01/10/90645.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/PietroLibroBlog/comments/commentRss/90645.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/PietroLibroBlog/services/trackbacks/90645.aspx</trackback:ping>
        </item>
        <item>
            <title>Classe CultureInfo e separatore decimale</title>
            <link>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/01/08/90607.aspx</link>
            <description>&lt;p&gt;Se volessimo, ad esempio, cambiare il carattere di separatore decimale in una nostra applicazione, è sufficiente utilizzare &lt;/p&gt;
&lt;p&gt;la classe System.Globalization.CultureInfo. Esempio: &lt;/p&gt;
&lt;p&gt;   &lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:359868e5-ef2a-4a12-86bd-eb5428d8d468" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;
&lt;pre style="overflow: auto; background-color: White;"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Dim&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; culture &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;New&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Globalization.CultureInfo(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;it-IT&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Dim&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; numberFormat &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;New&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Globalization.NumberFormatInfo()&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Visualizza il separatore decimale corrente&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;MessageBox.Show(numberFormat.NumberDecimalSeparator)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Imposta la chiocciola come separatore decimale&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; &lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;numberFormat.NumberDecimalSeparator &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;@&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; culture.NumberFormat &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; numberFormat&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Visualizza il separatore decimale corrente&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;MessageBox.Show(numberFormat.NumberDecimalSeparator)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Imposta l'oggetto Culture&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;System.Threading.Thread.CurrentThread.CurrentCulture &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; culture&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Dim&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; valore &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;Double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; valore &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;10&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;30&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;Visualiza 0@33333333&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; &lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;MessageBox.Show(valore)&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;
&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:18f2b2c3-9d49-4466-818a-af84e5b76360" style="margin: 0px; padding: 0px; display: inline;"&gt;Technorati Tag: &lt;a href="http://technorati.com/tags/CultureInfo" rel="tag"&gt;CultureInfo&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/PietroLibroBlog/aggbug/90607.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Pietro Libro</dc:creator>
            <guid>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/01/08/90607.aspx</guid>
            <pubDate>Tue, 08 Jan 2008 00:42:27 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2008/01/08/90607.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/PietroLibroBlog/comments/commentRss/90607.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/PietroLibroBlog/services/trackbacks/90607.aspx</trackback:ping>
        </item>
        <item>
            <title>Contenuto di un file HTML e Microsoft XML </title>
            <link>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2007/08/20/87874.aspx</link>
            <description>&lt;p&gt;&lt;font face="Verdana, Arial, Helvetica, sans-serif" size="2"&gt;Supponiamo di avere un file (html) contenente una lista non ordinata del tipo &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li id="Eventi"&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Eventi&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li id="Notizie"&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Notizie&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li id="NewsLetter"&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;NewsLetter&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li id="Sottomenu"&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Sottomenu&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li id="Agenzie"&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;Agenzie&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana, Arial, Helvetica, sans-serif" size="2"&gt;e di voler modificare (a run-time) il contenuto di uno degli elementi "&amp;lt;li&amp;gt;" . Supponiamo di voler trovare l'elemento con "id" uguale a "Eventi",&lt;br /&gt;
di voler aggiungere un nuovo attributo (class) con valore "Selected" e di voler eliminare il nodo &amp;lt;a href....&amp;gt;&amp;lt;/a&amp;gt; e lasciare  il nodo&lt;br /&gt;
&amp;lt;span&amp;gt;Evento&amp;lt;/span&amp;gt;.E' possibile fare quanto detto in modo molto semplice utilizzando l'oggetto COM Microsoft XML (Versione 3.0 o superiore)&lt;br /&gt;
e scrivendo il seguente codice:&lt;/font&gt;&lt;/p&gt;
&lt;pre class="code" id="codemain" style="MARGIN: 6px"&gt;&lt;span class="keyword"&gt;	Dim&lt;/span&gt; doc &lt;span class="keyword"&gt;As&lt;/span&gt; New MSXML2.DOMDocument
        &lt;span class="comment"&gt;'Carico il contenuto del file con la lista non ordina HTML
&lt;/span&gt;        &lt;span class="keyword"&gt;Dim&lt;/span&gt; xmlString &lt;span class="keyword"&gt;As&lt;/span&gt; &lt;span class="keyword"&gt;String&lt;/span&gt; = System.IO.File.ReadAllText(&lt;span class="literal"&gt;"C:\Inetpub\wwwroot\DomExample\test.ssi"&lt;/span&gt;)
        &lt;span class="keyword"&gt;If&lt;/span&gt; (doc.loadXML(xmlString)) &lt;span class="keyword"&gt;Then&lt;/span&gt;
 
            &lt;span class="keyword"&gt;Dim&lt;/span&gt; testoNodo &lt;span class="keyword"&gt;As&lt;/span&gt; &lt;span class="keyword"&gt;String&lt;/span&gt; = &lt;span class="keyword"&gt;String&lt;/span&gt;.Empty
            &lt;span class="keyword"&gt;Dim&lt;/span&gt; nodo &lt;span class="keyword"&gt;As&lt;/span&gt; MSXML2.IXMLDOMNode = &lt;span class="keyword"&gt;Nothing&lt;/span&gt;
            &lt;span class="keyword"&gt;Dim&lt;/span&gt; root &lt;span class="keyword"&gt;As&lt;/span&gt; MSXML2.IXMLDOMNode = &lt;span class="keyword"&gt;Nothing&lt;/span&gt;
 
            &lt;span class="comment"&gt;'Cerco il nodo interessato
&lt;/span&gt;            &lt;span class="keyword"&gt;Dim&lt;/span&gt; nodeList &lt;span class="keyword"&gt;As&lt;/span&gt; MSXML2.IXMLDOMNodeList = doc.selectNodes(&lt;span class="literal"&gt;"//li[@id='Eventi']"&lt;/span&gt;)
 
            &lt;span class="keyword"&gt;If&lt;/span&gt; (nodeList.length &amp;gt; 0) &lt;span class="keyword"&gt;Then&lt;/span&gt;
                &lt;span class="comment"&gt;'Ha trovato il nodo
&lt;/span&gt;                root = nodeList.item(0)
 
                &lt;span class="comment"&gt;'Recupero il testo del link
&lt;/span&gt;                &lt;span class="keyword"&gt;Dim&lt;/span&gt; testoLink &lt;span class="keyword"&gt;As&lt;/span&gt; &lt;span class="keyword"&gt;String&lt;/span&gt; = root.text
                &lt;span class="comment"&gt;'Creo  l'attributo Class....
&lt;/span&gt;                &lt;span class="keyword"&gt;Dim&lt;/span&gt; attributoClass &lt;span class="keyword"&gt;As&lt;/span&gt; MSXML2.IXMLDOMAttribute = doc.createAttribute(&lt;span class="literal"&gt;"class"&lt;/span&gt;)
                &lt;span class="comment"&gt;'...imposto il valore dell'attributo....
&lt;/span&gt;                attributoClass.value = &lt;span class="literal"&gt;"Selected"&lt;/span&gt;
                &lt;span class="comment"&gt;'aggiungo l'attributo create alla collezione di attributi del nodo...
&lt;/span&gt;                root.attributes.setNamedItem(attributoClass)
                &lt;span class="comment"&gt;'Recupero il nodo &amp;lt;span&amp;gt;...&amp;lt;/span&amp;gt;...
&lt;/span&gt;                &lt;span class="keyword"&gt;Dim&lt;/span&gt; nodoSpan &lt;span class="keyword"&gt;As&lt;/span&gt; MSXML2.IXMLDOMNode = root.childNodes(0).childNodes(0)
                &lt;span class="comment"&gt;'... lo sostituisco al nodo &amp;lt;a href=....&amp;gt;&amp;lt;/a&amp;gt;
&lt;/span&gt;                root.replaceChild(nodoSpan, root.childNodes(0))
            &lt;span class="keyword"&gt;End&lt;/span&gt; &lt;span class="keyword"&gt;If&lt;/span&gt;
 
            &lt;span class="comment"&gt;'Visualizzo il contenuto del file modificato...
&lt;/span&gt;            MessageBox.Show(doc.xml)
        &lt;span class="keyword"&gt;Else&lt;/span&gt;
            MessageBox.Show(&lt;span class="literal"&gt;"Impossibile leggere il contenuto del file"&lt;/span&gt;)
        &lt;span class="keyword"&gt;End&lt;/span&gt; &lt;span class="keyword"&gt;If&lt;/span&gt;&lt;/pre&gt;&lt;img src="http://blogs.ugidotnet.org/PietroLibroBlog/aggbug/87874.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Pietro Libro</dc:creator>
            <guid>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2007/08/20/87874.aspx</guid>
            <pubDate>Mon, 20 Aug 2007 01:48:42 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2007/08/20/87874.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/PietroLibroBlog/comments/commentRss/87874.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/PietroLibroBlog/services/trackbacks/87874.aspx</trackback:ping>
        </item>
        <item>
            <title>PDF e Java in .Net</title>
            <link>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2007/07/14/85642.aspx</link>
            <description>&lt;font size="2" face="Verdana, Arial, Helvetica, sans-serif"&gt;
Girovagando tra i vari siti di programmazione ed affini ho trovato questi due link:
&lt;br&gt;
&lt;br&gt;
1) Convertire un file PDF in semplice testo (in tre righe!) in .Net 
&lt;br&gt;
&lt;a href="http://www.codeproject.com/cs/samples/pdf2text.asp" target="_blank"&gt;Converting PDF to Text in C#&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
2) Utilizzare librerie java in .Net con IKVM.NET
&lt;br&gt;
&lt;a href="http://www.ikvm.net/uses.html" target="_blank"&gt;Uses for IKVM.NET&lt;/a&gt;
&lt;br&gt;	
&lt;/font&gt;
&lt;img src="http://blogs.ugidotnet.org/PietroLibroBlog/aggbug/85642.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Pietro Libro</dc:creator>
            <guid>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2007/07/14/85642.aspx</guid>
            <pubDate>Sat, 14 Jul 2007 07:33:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2007/07/14/85642.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/PietroLibroBlog/comments/commentRss/85642.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/PietroLibroBlog/services/trackbacks/85642.aspx</trackback:ping>
        </item>
        <item>
            <title>AutoCompleteStringCollection e risorse incorporate</title>
            <link>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2007/06/16/81951.aspx</link>
            <description>&lt;font face="Verdana" size="2"&gt;Piccolo esempio (nato da una discussione su di un forum) di come utilizzare una risorsa incorporata (file XML) per popolare un oggetto AutoCompleteStringCollection per usufruire della funzione di completamento automatico di un controllo TextBox.

&lt;a href="http://www.pietrolibro.name/sources/AutoCompleteSourceEmbedded.zip"&gt;AutoCompleteSourceEmbedded.zip&lt;/a&gt;
&lt;/font&gt;&lt;img src="http://blogs.ugidotnet.org/PietroLibroBlog/aggbug/81951.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Pietro Libro</dc:creator>
            <guid>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2007/06/16/81951.aspx</guid>
            <pubDate>Sat, 16 Jun 2007 08:09:00 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/PietroLibroBlog/archive/2007/06/16/81951.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/PietroLibroBlog/comments/commentRss/81951.aspx</wfw:commentRss>
            <trackback:ping>http://blogs.ugidotnet.org/PietroLibroBlog/services/trackbacks/81951.aspx</trackback:ping>
        </item>
    </channel>
</rss>