Category Archives: Code

Programming, programming languages, software design patterns, hacks, peculiarities… It is what coders love.

Why cripple the .NET RSA implementation?

I just found out that RSACryptoServiceProvider, the RSA implementation in .NET, does not allow you to use a private key to encrypt data. I’m no cryptographic expert, but I do know how asymmetric key algorithms like RSA work, and that … Continue reading

Posted in C#, Technical | 8 Comments

Strongly typed data binding in Windows Forms

Windows Forms data binding is a great tool for model-view-style applications, where the connection between the model and its view is easily declared. However, data binding is also an error-prone and tedious process with no IntelliSense support where properties are … Continue reading

Posted in C#, Code, Technical | Leave a comment

AJAST – Cross-domain REST calls using JSON injection

The typical (and original AJAX) approach to calling web services asynchronously from a browser uses the XMLHTTPRequest object to request data asynchronously. However, as most of you probably already know, requests made using this object are restricted to the same … Continue reading

Posted in Code, Javascript, Technical | Tagged , , , , | 20 Comments

Extension methods for copying or cloning objects

C# 3.0 includes a new feature known as extension methods, and fiddling with it triggered the idea of creating a mechanism for copying or cloning (virtually) any .NET object or graph of objects. The manifestation of that idea has become … Continue reading

Posted in C#, Code, Technical | Tagged , , , , , , | 48 Comments

LINQ vs Loop – A performance test

I just installed Visual Studio 2008 beta 2 to see what the future holds for C#. The addition of LINQ has brought a variety of query keywords to the language. “Anything” can be queried; SQL databases (naturally), XML documents, and … Continue reading

Posted in Code, Technical | Tagged | 20 Comments