Dragging and dropping files not working with Knockout.js
I recently encountered a problem when trying to implement drag and drop file uploads in a site I’m working on that uses Knockout.js. A simplified reproduction of the problem is as follows:
The performance advantage of generic type constraints
Have a look at the following two methods.
Different URI encoding formats in C#
Ever need to encode a string of text to make it web-compliant in some way but didn’t know which encoding function to use? I recently stumbled across a StackOverflow post where a user has provided a sample table of the different encodings provided by the HttpUtility and Uri classes in C# and thought I would share it here. As an example, this is what is provided for the greater-than sign (>):
The danger of default method values in C#
While seemingly benign, methods containing default parameter values can be the cause of mysterious errors in deployed applications. To see why, let’s define a new class library called “ConsoleWriter” and add to it the following code.