SaveSoapData – serializing an object to file in SOAP format
‘ Serialize an object to file in SOAP format.Sub SaveSoapData(ByVal path As String, ByVal o As Object) ‘ Open a file stream for output. Dim fs As FileStream = New
‘ Serialize an object to file in SOAP format.Sub SaveSoapData(ByVal path As String, ByVal o As Object) ‘ Open a file stream for output. Dim fs As FileStream = New
‘ Display a XML file in a TreeView’ Note: requires Imports System.Xml’ Example: DisplayXmlFile(“employees.xml”, TreeView1)Sub DisplayXmlFile(ByVal filename As String, ByVal tvw As TreeView) Dim xmldoc As New XmlDocument() xmldoc.Load(filename) ‘
‘ A reusable function that does object cloning’ by serializing it to a memory streamFunction CloneObject(ByVal obj As Object) As Object ‘ Create a memory stream and a formatter. Dim
‘ Deserialize an object from a file in SOAP format.Function LoadSoapData(ByVal path As String) As Object ‘ Open a file stream for input. Dim fs As FileStream = New FileStream(path,
‘ Create an XmlElement object with inner text and make it a child of another ‘ XmlNode.’ Note: requires Imports System.XmlFunction CreateAppendElement(ByVal parentNode As XmlNode, ByVal name As String, _
‘ A module for evaluating expressions, with support for’ parenthesis and many math functions’ Example:’ Dim expr As String = “(SQR(9)^3)+COS(0)*3+ABS(-10)”‘ txtResult.Text = Evaluate(expr).ToString ‘ ==> 27+3+10 ==> 40 Imports
The Component Services MMC gives you an easy way to export and import COM+ applications. However, if you want to export the entire COM+ catalog to one or more systems
Private Declare Function ShellExecute Lib “shell32.dll” Alias “ShellExecuteA” _ (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String,
‘ This filtering function returns True if the member name ‘ begins with the character passed as its second argument.’ Note: it requires Imports System.ReflectionFunction FilterByName(ByVal m As MemberInfo, ByVal