TDD/Unit Tests advantages?

Hi, right now I am looking a little bit into TDD and unit tests with C#. I was watching some tutorials and read a little bit about it. The authors always recommended it to young unexperienced developers (which I am).

But I don't get why I benefit from this technique. If I write bad but working code the tests will succeed and I will still use my bad code. So how does TDD/unit testing improve my skills as a developer?

TL;DR: What are the advantages of TDD/unit testing.

by ogerkoenig via /r/csharp

Button Names From Form Not Updating Into Code

Hello, I'm new to C# and I was building my first form using the language. I layed out a rough draft for the form and began applying the code to each button, but I found the names of some of the buttons were not updating into the code. When I tried to manually change the names in the code, I was given an error and it erased my form.

So as of now, for example: "btnFlushDNS" is "button1" in the code, as it has not updated.

If anyone knows how to resolve this, any help would be appreciated. Thank you.

by PS_FuckYouJenny via /r/csharp