In order to make my code superclear, I'm trying to do something like that:
var result = $@"...
<div class='modal-body'>
{content}
</div>
{(haveButtons ? "" : "<div class='modal-footer'>")}
{modalButtons.ForEach(m => "INSERT SOME HTML")}
{(haveButtons ? "" : "</div>")}
..."
But, of course, that doesn't compile because in the lambda I need to put some code and not just a magic return. Is there any way to do that?
{string.Join("", modalButtons.Select(m => "INSERT SOME HTML"))}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With