WTF code

2007-06-28 02:49 pm
[personal profile] selfmade
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;
    }
}

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

Date: 2007-06-29 01:50 am (UTC)
From: [identity profile] selfmade.livejournal.com
Да вот такой - http://msdn2.microsoft.com/en-us/library/system.data.oracleclient.oracleboolean(VS.80).aspx

where a standard Boolean has two possible values, true and false, an OracleBoolean structure has three possible values, True, False, or Null.

Profile

selfmade

April 2017

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

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated 2026-04-18 02:46 pm
Powered by Dreamwidth Studios