When I disable the nullable reference types in specific parts of my code, then the #nullable disable
and #nullable restore
are not indented as I expect it. This is what I currently receive:
#nullable disable
var options = new ScraperExcelListoneColumnNamesOptions
{
PlayerId = null,
RoleCode = "",
PlayerName = " ",
TeamName = null
};
#nullable restore
I would like them to be indented like this (as it would be when working with #region
.
#nullable disable
var options = new ScraperExcelListoneColumnNamesOptions
{
PlayerId = null,
RoleCode = "",
PlayerName = " ",
TeamName = null
};
#nullable restore
Is there a place to edit this setting in Visual Studio? Of course I could indent them manually, but
- It would be annoying
- If I format the entire document with Visual Studio using
Ctrl+K
andCtrl+D
it would set back the originary formatting.