79312824

Date: 2024-12-27 21:35:15
Score: 1
Natty:
Report link

default can also improve maintainability with structs, ie if I change

public class MyDto
{
    public int Id { get; set; }
}

to

public class MyDto
{
    public int? Id { get; set; }
}

then

if (dto.Id == default)

will continue to function just fine.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): can also
  • Low reputation (0.5):
Posted by: mariusz96