Miscellaneous .net code