Using CSharp 6 features to write shorter methods

In this article we'll

  • Explain that in C#6 Microsoft introduced an easier way of writing a single line method
  • Use Ctrl + K + D to automatically format our source code

new way

bool ShipperDoesNotExist() => !Relations[Shippers].RowFound; 

old way

bool ShipperDoesNotExist()
{
    return !Relations[Shippers].RowFound;
} 

Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com