







A Custom Proxy that Handles Thread Creation and Object Pooling
enerally, when a good programmer has to design a type (or a hierarchy of types), he does an analysis of the problem and then starts to write properties and methods
enerally, when a good programmer has to design a type (or a hierarchy of types), he does an analysis of the problem and then starts to write properties and methods
‘ Return the array of IP addresses for the local host’ Note: Requires Imports System.Net’ Example:’ Dim ipa As IPAddress’ For Each ipa In GetLocalHostIpAddresses()’ Debug.WriteLine(ipa.ToString())’ NextFunction GetLocalHostIpAddresses() As IPAddress()
‘ Serialize an object to file in binary format’ It can handle types that the SOAP serialization can’t’ Requires:’ Imports System.IO’ Imports System.Runtime.Serialization.Formatters.BinaryPrivate Sub SaveBinaryData(ByVal path As String, ByVal o
‘ Return the OleDbType that represents the specified system type’ This is particularly useful when you have a DataTable and want to create a ‘ OleDbParameter for onw of its
‘ Deserialize an object from a file in binary format’ It can handle types that the SOAP serialization can’t’ Requires:’ Imports System.IO’ Imports System.Runtime.Serialization.Formatters.BinaryPrivate Function LoadBinaryData(ByVal path As String) As
‘ Return the HTML code for the specified Color’ Example: MessageBox.Show(Color2Html(Color.Red)) ==> #ff0000Function Color2Html(ByVal clr As Color) As String Return “#” & clr.ToArgb().ToString(“x”).Substring(2)End Function
Printing con be quite difficult in VB.NET (or any other .NET language), especially if you not only have to print plain text, but also tables, images, bulleted lists, text with