If you are getting some unexplainable 404 errors when accessing html or asp.net pages in IIS, and have exhausted the more common issues, check out your log file for URLScan errors. URLScan is a Microsoft security tool to help protect Internet Information Server. On your developer environment it might be getting in the way. How […]
Continue reading...Monday, June 29, 2009
Comments Off on Rounding Numbers in C#
A quick overview on rounding numbers in C# with examples: // To Round 3.1415 to nearest integer -> 3 decimal result1 = Math.Round(3.1415m); // To Round 3.1415 to the third decimal place -> 3.142 decimal result2 = Math.Round(3.1415m, 3); // To Round 18.5m Up -> 19 decimal result3 = Math.Round(18.5m, 0, MidpointRounding.AwayFromZero); // The default […]
Continue reading...Saturday, December 20, 2008
Here is one method to manipulate Null characters in C#: To Search a String for a Null character: mystring.Contains(Convert.ToChar(0x0).ToString() ); //The hexidecimal 0x0 is the null character To Replace all Null Characters in a String: mystring.Replace(Convert.ToChar(0x0).ToString(), ""); Why Do I Need This? It might help. I needed it when I got a nasty error message […]
Continue reading...Tuesday, November 28, 2006
Comments Off on Flexible Business Logic with a .Net Math Parser
Modifying code due to business logic changes is a never ending process. In this entry I discuss the merit's of using a math parser to dynamically calculate business logic at run time. This allows for quicker updates and flexible code. I use a real world example of a coupon component that I added to an […]
Continue reading...
Friday, July 3, 2009
1 Comment