Browse by Tags

All Tags » Code » .NET (RSS)

2008 Scripting Games - My solutions

Here are my solutions to the 2008 Scripting Games scripting competition. This is a rather large post but I decided one post would be better than posting them all individually, this way they will all be in one place when I want to find them later. I had...

Issues with the XmlSerializer in medium trust environments

In my last post I briefly mentioned that CodeHTMLer had issues running in a medium trust environment. The simple web application front end I created kept failing before it ever got started. It keep hitting a SecurityException nested in an InvalidOperationException...

Fun with C# functions

Dustin Campbell has an interesting series on C# functions on his Did it with .NET blog. Fibonacci Numbers, Caching and Closures What's in a Closure? Using Automatic Memoization A Higher Calling The Art of Currying Building Functions from Functions, part...
Posted by puzzlehacker | with no comments
Filed under: ,

Failure creating an Outlook application object on Vista

While creating a Outlook application object from another process in C# like: outlook = new Microsoft.Office.Interop.Outlook.Application(); or powershell PS > $outlook = new-object -com Outlook.Application or straight up COM via CoCreateInstance on...
Posted by puzzlehacker | 7 comment(s)
Filed under: , ,

Why does my Outlook event seem to stop working?

Imagine we have some code in an Outlook addin that looks similar to code below. Does anyone see anything wrong with it? It simply places a button on the menu bar and shows a message box when the button is clicked. The code works for sometime but then...
Posted by puzzlehacker | 6 comment(s)
Filed under: , ,

Powershell script to find strings and highlight them in the output

After reading about Brad 's find script I starting thinking about how cool it would be if I could highlight the search pattern in the output. So I wrote my own custom Find-String script to highlight the results. Find-String.ps1 # Find-String.ps1 # Wrapper...
Posted by puzzlehacker | 2 comment(s)
Filed under: , ,

Retrieving your Outlook appointments for a given date range

Before we dive into the code sample lets take a quick look at what it means for an appointment to fall into a given date range. When you compare an appointment with a given date range (or any two time intervals) there are the 6 possible outcomes displayed...
Posted by puzzlehacker | 8 comment(s)
Filed under: , , ,

How do I access my Outlook contacts from my web application?

Question How do I access my Outlook contacts from my web application? Short Answer You don't, well at least you shouldn't (It is theoretically possible to access Outlook data from a web application, assuming Outlook is installed and the profile...

CodeHTMLer plugin for Windows Live Writer

I've started using Windows Live Writer as my primary blogging tool. So far I like it. However, it was missing an easy way to insert highlighted code into posts. I know there are a few other plugins that can insert highlighted code, but since I'm the author...
Posted by puzzlehacker | 1 comment(s)
Filed under: , , ,

nContract - Quick Start Guide

The purpose of this quick start guide is to step through a simple but complete example of how to create a third party component with configurable run-time checks of a contract specification using nContract. To fully follow along with this example you...
Posted by puzzlehacker | 4 comment(s)
Filed under: , , ,
More Posts Next page »