Contents tagged with C#

  • Introducing Task.CompletedTask

    Tags: C#, async, Task

    When you start asynchronous programming with the async/await keywords, there are several rules you should always think about:

    Avoid async void

    Do not return null instead of a Task

    Await your … more

  • Building C# 6 code on AppVeyor

    Tags: VS2015, C#, Open-Source

    We all love the new features of C# 6. String interpolation, nameof keyword, auto properties, … and certainly the null-conditional operator! Now we can finally implement INotifyPropertyChanged … more

  • Be aware to not await null

    Tags: C#, async, Task

    The addition of async/await to the C# language specification made it easier to write asynchronous code. However while writing code, you’ll end up in some cases where you don’t have a Task … more

  • Drop GDI+ in WinForms and move to WPF

    Tags: .NET, C#, WPF

    Recently a friend of mine came to me asking for some advice on his first C#-project, in which he had to port an existing application to the .NET Framework. He had some minor issues with drawing … more

  • Closing your Office processes while using PIA

    Tags: C#, Office

    With Office 2007, developers are able to access and modify Office 2007 documents by using the Open XML Formats as an alternative to Office Interop. But even a few years after the release of Office 200 … more

  • LINQ to SQL not generating code for association

    Tags: C#, LINQ

    It’s a good practice to create a proof of concept in a separate project to test out some new features or untested ideas, or to try and fix a certain problem. This way you’re able to focus … more