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 03:44 am (UTC)
From: [identity profile] juan-gandhi.livejournal.com
А, знаю, знаю. А напишешь в одну строчку, скажут - многа букав.

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