Michael Wei's .net code