Miscellaneous .NET code