Built on .NET Framework 4.5.2. Then downgraded to 4.0...
Recently I had to build a Windows app.
I heard .NET 4.5 added the new async syntax, so.. might as well, I went with 4.5.2. Oh…… it’s incredibly convenient.!!
async and await are the two important parts. Especially in UI programs, they make syncing between the background thread and the main thread easy.
Below is code that takes an id/pwd and authenticates against a server.
| |
As you can see, the login is handled entirely in the client event… with no separate thread synchronization..
Then today I ran tests… Not many PCs.. have .NET Framework 4.5.. installed…..
… so.. I rewrote it on 4.0.. with BackgroundWorker…
Ugh… (the program only has three screens, thankfully)