FundooZone!!!  

Go Back   FundooZone!!! > Humor Zone > Tech Humor

Tech Humor A place for Tech Humor.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 4th January 2010   #5
GodFather

Capo dei capi
 
GodFather's Avatar
 

Join Date: Jan 2006
Location: Underworld
Posts: 6,066
FZ Credits: 8,140,561
Thanks: 2,077
Thanked 686 Times in 219 Posts
FZ Credits: 8,140,561
GodFather has a brilliant futureGodFather has a brilliant futureGodFather has a brilliant futureGodFather has a brilliant future
GodFather has a brilliant futureGodFather has a brilliant futureGodFather has a brilliant futureGodFather has a brilliant futureGodFather has a brilliant futureGodFather has a brilliant futureGodFather has a brilliant futureGodFather has a brilliant futureGodFather has a brilliant futureGodFather has a brilliant future
Re: Coding Horrors

Quote:
Originally Posted by Admin View Post
Today I encountered this piece of code in our Application and i was like WTF..This has been developed by our self proclaimed .Net Expert

This method is supposed to return true if passed string is a number. However, the developer has used interesting logic
If lower case and upper case of the string are equal then it is a number

csharp Code:
  1. public static bool isNumber(string strToCompare)
  2.         {
  3.             try
  4.             {
  5.                 if (String.IsNullOrEmpty(strToCompare) == false && strToCompare.ToLower() == strToCompare.ToUpper())
  6. return true;
  7.                 else
  8.                     return false;
  9.             }
  10.             catch (Exception ex)
  11.             {
  12.                
  13.             }
  14.                 return false;
  15.             }
  16.         }
You know, I too have one self proclaimed .NET expert here. Who hates Javascript and one day I told him, do you know how the .NET framework operates. How the postback happens....
__________________

GodFather is offline   Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding Yeda Anna Tech Humor 3 29th March 2008 03:48 PM
Very Intelligent But 'Un-Ethic@l' Coding - Have a Look | dubaiguru Tech Talk 7 16th November 2007 01:12 PM
Coding vs. Debugging DreamWeaver Global Humor 5 16th October 2006 08:11 PM


All times are GMT +6.5. The time now is 09:17 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Template-Modifications by TMS
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios