Sample code for .net showing errors