Tag: C#

  • Tip: ToString() for your custom Class

    While writing code and then debugging with step by step debugger you often just roll over a variable to see what it contain. With custom class it shows the class name/namespace path by default. And it makes debugging harder. A simple solution to this is to add a override to the ToString function in your…

  • Refreshing USB ports using C#

    Finished a project in which I need to refresh the USB ports by just before we start some particular benchmarking application my client has. Seems pretty easy job, if you know to gain access of system resource. But, it become fun job, when I found that knowledge of system is not even necessary for this…

  • C#: Code to load Object from Database

    It is often when managing old project that do not use ORM coding, we need to load object from database. In such scenarios it is quite boring to code all 30-40 property to load from DB. So, I wrote this simple code which does it quite well for me, the only catch is you need…