Fun
Well... I cant really express my feelings for this kind of programming... The WTF way: DateTime myNewDate = DateTime.Parse((myOldDate.Year - 1).ToString() + "-" + myOldDate.Month.ToString() + "-" + myOldDate.Day.ToString()); The right way: DateTime myNewDate = myOldDate.Date.AddYears(-1);
Well, this one i simply cannot understand... why anyone would do +0 after and int.parse. Any Ideas? int myVar = Int32.Parse(ConfigurationMa... + "") + 0;
Sometimes we find some code that... well.... I guess someone must be really REALLY high to write... The WTF way DateTime.Parse(DateTime.Now... The right way: DateTime.Now.ToString("dd-M
In this category I will post some "creative" solutions to problems. (Code changed to protect the inocents). // The WTF way int myInt = Int32.Parse(myDataTable.Row... + ""); // The correct way int myInt = myDataTable.Rows.Count;