Unique names for test output files

We´d like to unit test everything but sometimes that´s just not enough. Especially when working with third-party libraries which output files of some kind and we need to verify the result. We could use something like this to get a unique name for our temporary test...

Copy pure text from WPF DocumentViewer XPS

I (as previously mentioned) use the WPF DocumentViewer for previewing word documents as XPSs. Howerver, as curious users are often more curious then they should be I´ve found that some users wish to copy text from the XPS directly to Word. This gives us some amount of...

Opening XPS-files

Perhaps nobody uses xps-files? Well, I do. Not because they´re neat or nice or good or anything but because they´re there and Microsoft actually has support for them. I use xps-s for previewing office documents since they can be opened in wpf and Office standard...

Byte order mark

Ever tried to put together a neat little XML document with the XDocument -class? Its quite nice but when not working together with IO (in other words, not actually writing the XML to disk) you´re sure to experience the BOM. BOM is an abbreviation for Byte Order Mark,...

Subclass type usage

I loves reflection. I loves reflection all day long 🙂 Just now I found another nice usage of the not-even-real-reflection Object.GetType() method. Say we got a framework that works with plugins implementing an abstract class: public abstract class PluginBase { public...