Inline if conditionals in dotnet new template
I have a class like the following:
I want to add a parameter to the template to make the class inherit a specific interface.
If I do this using:
Then the outputted code would be:
Which we can all probably agree on does not look that great
Is there a way to inline these conditionals?
For example, something like:
8 Replies
as a possible work around, can you conditionally include entire different files?
That is a possibility, but how would the naming of the file work
not to mention the duplicated code
what about
That is an amazing solution, I might go with that
thanks :catbless:
👍
You can also use partial classes
I did consider that, but I feel like it'd be hell to actually work with
(not that it's any prettier tbh)