Category Archives: Libraries

Anything related to .NET libraries–whether Microsoft or third-party.

Forcing a Database Update with DevExpress

How can you force DevExpress to update the database? Either change the module versions in the ModuleInfo table, or else obliterate the entire database. Then run the DB Updater (in either case) and it will regenerate the schema. Continue reading

Posted in Libraries, Web, Wndows Forms | Tagged | Leave a comment

If/Else Statements in MVC3 With Razor

How can you write an If/Else statement in ASP.NET MVC3? The answer is, surprisingly, with only one @-sign; although similar code would take five sets of angle-brackets in MVC2, Razor lets us write it with just one — which shows that their design goal of enabling a fluid coding flow was very successful. Continue reading

Posted in Libraries, Web | Tagged , | Leave a comment

Tools Update: BaseEncoder and Hasher

We’ve updated the Tools library again. You can now convert integers to an from an arbitrary base (binary, hexadecimal, base64, or any base you wish) as well as calculate SHA-1 hashes of strings with one function call. Useful! Continue reading

Posted in Libraries, Silverlight, Web, Wndows Forms | Tagged , | Leave a comment

Persistent Storage 1.1: Arbitrary Object Serialization

Persistent Storage 1.1 brings a much-needed feature: the ability to serialize any arbitrary object quickly and efficiently — even without specifying any attributes. Thanks to Mike Talbot of Alterian for his Silverlight serializer. Continue reading

Posted in Libraries, Silverlight | Tagged , | 1 Comment

Silverlight Audio Player

Playing audio files in Silverlight is non-trivial. Hence, the need for a library that allows you to do so; so this is another Tools update to include an AudioManager Silverlight-only class. What does it do? It allows you to play … Continue reading

Posted in Libraries, Silverlight | Tagged , | Leave a comment

Tools Update: Read Embedded Text Files in Silverlight

Tools now includes a EmbeddedResourceFileReader class that allows you to read the contents of text files at runtime; this is exciting for Silverlight development, where you may have lots of data you want to dump into a file and read at runtime. Well, now you can! Continue reading

Posted in Core .NET, Libraries, Silverlight, Wndows Forms | Tagged , , , | Leave a comment

Normal Distribution Random Generator Available!

We’re pleased to announce a new reusable library: a normally-distributed random number generator. It works like a standard integer random number generator, but produces a normal (bell-curve) distribution instead of a uniform (flat) one. We also packaged a Mersenne Prime implementation with it. Continue reading

Posted in Libraries, Silverlight, Web, Wndows Forms | Tagged , | 1 Comment

SQLite + ADO.NET + C# 4.0

C# 4.0 and SQLite ADO.NET don’t play together so well. You might get some crazy exception about the mixed mode assembly version can’t be loaded without configuration. Then, you’re flying! Continue reading

Posted in Libraries, Tools, Wndows Forms | Tagged , , , , , | 9 Comments

Setting SELECTED in ASP.NET MVC DropDowns

Microsoft’s ASP.NET MVC framework has a nice little helper for creating drop-down lists called Html.DropDownList. But how do you tell it to pre-select a value, i.e. set the SELECTED attribute on the correct OPTION tag? The answer is to use an alternate constructor for your SelectList that sets the selected-value object. Continue reading

Posted in Libraries, Web | Tagged , , | Leave a comment