Archive for February 2nd, 2010

Generate a temporary file name on disk – C#

public static string getTemporaryFile(string extension) { string tempfile = String.Empty; if (!extension.StartsWith(“.”)) extension = “.” + extension; tempfile = Path.Combine(System.IO.Path.GetTempPath(),Guid.NewGuid().ToString()+ extension); return tempfile; }

Tags:

Leave a Comment

Reading and Parsing XML Nodes – C#

The XmlTextReader provides a forward only mean of reading a specific XML node. The application reads each node of an XML document, determining along the way whether the current node is what is needed. This is typically accomplished by constructing an XmlTextReader object and then iteratively calling—within a loop—the XmlTextReader::Read method until that method returns [...]

Tags:

Leave a Comment

Convert VirtualBox VDI file to VMDK

To convert VDI to VMDK, you just need to use VirtualBox itself. VBoxManage clonehd | { -format VDI|VMDK|VHD|RAW| } {-remember } format: Allow to choose a file format for the output file different from the file format of the input file. remember: Keep the destination image registered after it was successfully written. Once this is [...]

Tags:

Leave a Comment