2007-06-28

WTF code

2007-06-28 02:49 pm
What the fuck ?!!

protected bool _IsDate (string strDate)
{
    try
    {
        // Trap for the / in a date string. Reuters sends it that way
        int intTrapped = 0;
        string _strSeparator = "/";
        intTrapped = strDate.IndexOf(_strSeparator);

        if (intTrapped <=0)
        {
            return false;
        }

        return true;
    }
    catch
    {
        return false;
    }
}

Это у нас на работе такой код.

Profile

selfmade

April 2017

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated 2026-04-18 05:34 am
Powered by Dreamwidth Studios