How to Convert Office File to PDF File Format in C#

How to Convert Office file to PDF in C#.

These codes are used for Microsoft Office products with the Save As PDF add-in installed.

Note that You will need to add a reference to Microsoft.Office.Interop.(word,excel, or powerpoint)

Continue reading

Serialization and Deserialization

Serialization is a process of converting an object into a stream of data, to easily transfer over the network or to save to disk.   So, using this concept of serialization, we can serialize any object to XML string.
Here is a person class that we can serialize.


Here is the code that takes the person object into string of xml format.

Using Serialization in .NET is provided by the System.Runtim.Serialization name space.

Once you have the XML string, now you can save it to disk, store it into database, or transfer over the network.
Here is the deserialization method that takes serialized string of XML into the person object.

Kyoungsu Do
Software Quality Engineer
ImageSource, Inc. 

 

ADODB To DataTable

Have you ever been working with ADODB, specifically ADODB RecordSets.  Have you ever thought to yourself, “There has got to be an easier way!”    Well, take solace because there is.

Continue reading

VB Coding in a .NET World

C# is the standard coding language for developers at ImageSource, but it wasn’t always that way.  Before, VB.NET was the predominant language of choice.  When converting some of the codebases over from VB.NET, we consistently run into areas where VB.NET specific commands have been used.  These commands either do not exist in C# or require use of the Microsoft.VisualBasic library.  Either make code conversion very frustrating when they are used.

Continue reading