DOT NET Core 3 announced

It will support now Windows desktop application

* Windows Forms
* Windows Presentation Framework (WPF)
* Universal Windows Platform (UWP) XAML

Benefits of .NET Core for Desktop

* Performance improvements and other runtime updates
* Very easy to use and/or test
* Machine-global and application-local deployment
* .NET Core CLI tools and SDK-style projects

Preview could come in year-end 2018
And the final version in early 2019

For more details visit:

.NET Core 3 and Support for Windows Desktop Applications

Other links:

Performance Improvements in .NET Core 2.1

C# custom validation ValidationAttribute

Using theĀ ValidationAttribute we can handle custom validation. It is available in namespace: System.ComponentModel.DataAnnotations Below is snippet for the same here age is being evaluated.

public class AgeValidator : ValidationAttribute
  public int Age { get; set; }

  public override bool IsValid(object value)
    DateTime dob;
    if (value != null
       && DateTime.TryParse(value.ToString(), out dob))
      if (dob.AddYears(Age) <= DateTime.Now)
        return true;
    return false;