The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Browse by Tags

All Tags » c# (RSS)
  • Re: My first run-in with C#

    [quote user="CDarklock"]Not entirely true - they can only be value types because of that. [/quote] Still not entirely true: System.String is a reference type, but you can declare a constant of it. System.TimeSpan is a value type, but you can't declare a constant of it. I don't have...
    Posted to Forum by Spectre on 11-05-2008
  • Re: Does this count as a WTF?

    [quote user="campkev"] [quote user="Spectre"][quote user="BlueKnot"]If the try block fails, but doesn't actually throw any kind of exception whatsoever, it goes 'BOOM'? [/quote] AFAIK, a parameterless catch block handles exceptions that are not derived from System...
    Posted to Forum by Spectre on 10-20-2008
  • [Help] How to wake up a bunch of dinosaurs ?

    Hello folks. First, let me introduce myself (quickly): I've been a developer for 5 years. I coded some winforms/webapps/console apps in VB6, then a lot web applications in Java and now I'm just using .NET (mostly C#). I'm NOT a "powercoder".I'm... let's say, probably slightly...
    Posted to Forum by Darth Developer on 07-03-2008
  • Re: Recursion in C# Properties

    [quote user="Sitten Spynne"] That said, the thought of using recursive code from properties is a horrible WTF. Property access should never throw a property or incur a delay; recursion can cause stack overflows or take some time to run. This is a situation that calls for Get/Set methods, rather...
    Posted to Forum by arty on 07-01-2008
  • Re: starts with null

    I don't think so... If he couldn't assign them at all, then he couldn't assign them to null in the first place. VB.Net does allow people to dim and initialize on the same line, whereas vb6 and vbscript do not. I would have set the object to what I needed it for, unless you have a reason not...
    Posted to Forum by pitchingchris on 03-10-2008
  • ASP .NET Questions...and WTF's and Rant

    I work at a small (4-5 people) web/software company. We're involved on this ASP website (backend in C#), where we're doing the front end and there's this programmer on the end of Skype who's writing the code behind it. From my perspective it's been one WTF after another, but with...
    Posted to Forum by wilko on 02-14-2008
  • When Math Attacks

    I just came across this gem in a "DataHelper" class that is used to hold static data related methods for an entire application. When I confronted the apparent owner of the code of it's intended purpose, I eventually got the "I didn't write it, I just moved it because I thought it might be used elsewhere...
    Posted to Forum by DigitallyBorn on 12-19-2007
  • Bug in FileSystemWatcher - .NET 2

    Hi all. Please excuse my english, as we speak spanish here. I have a problem with FileSystemWatcher. I had to monitor some directories, check for file changes... not big deal to figure out. I was about to build something using windows APIs, but my boss keeps on telling me to use NET and its controls...
    Posted to Forum by Xelort on 11-22-2007
  • Re: Exception handling!

    That's a very interesting way of simulating the On Error Resume Next-statement in VB. Nice!
    Posted to Forum by Mr. Lurker on 07-17-2007
  • Bad code as art form

    (I submitted this as a Code SOD but I post it here in case it isn't published) An ex-coworker of ours took the simplest of tasks and gave them a whole new level of abstraction. Some would call him a terrible programmer, I call him an artistic genius: private Decimal GetNumStatsPerPage() { int factor...
    Posted to Forum by Charles Nadolski on 07-12-2007
Page 1 of 2 (18 items) 1 2 Next >
Powered by Community Server (Non-Commercial Edition), by Telligent Systems