Coding For a Living

rss

A place to share and comment about coding for a living.


xRAD Well Known Names– Part 1 Mike McIntyre

 

Well known names are part my rapid application development (xRAD) frame work. In this blog post I introduce a well known name that has helped me, since 1992, to rapidly develop applications for my clients.

In 1992 I decided PostalCode would be the well known name I would use for: postal code, post code,and zip code.

Zip code, post code, and postal code are different names for the same thing - a code that is appended to the end of addresses to make it possible to quickly sort mail.

PostalCode is consistently used in my databases, models, code, generators, snippets, control names – anywhere one of my applications uses a zip code, post code, or postal code.

Stay tuned for my next XRAD blog post in which I will explain how a well known name like PostalCode contributes to rapid application development.


String IsDecimal Method Extension Mike McIntyre

 

public static class ExtNumbers
{
    public static decimal ToDecimal(this string value)
    {
        decimal result = Con.D0000m;
        if (String.IsNullOrEmpty(value))
        {
            return result;
        }
        decimal.TryParse(value, out result);
        return result;
    }
}