G
Guest
.... I know I could use a CodeSnippetExpression to do it, but that would
somewhat hardcode the resulting tree. I was looking for something like:
CodeTernaryExpression(
CodeExpression test,
CodeExpression trueExpression,
CodeExpression falseExpression);
Which would, of course, get turned into the corresponding:
(test ? trueExpression : falseExpression)
expression in C#, C++, or even J# (I believe). I guess it's only VB.NET
that doesn't have a ternary expression but I don't know for sure.
I know, I know, for generated code there's no real reason to use a ternary
expression, but coding habits are hard to break, even when writing meta-code
Regards,
-- TB
somewhat hardcode the resulting tree. I was looking for something like:
CodeTernaryExpression(
CodeExpression test,
CodeExpression trueExpression,
CodeExpression falseExpression);
Which would, of course, get turned into the corresponding:
(test ? trueExpression : falseExpression)
expression in C#, C++, or even J# (I believe). I guess it's only VB.NET
that doesn't have a ternary expression but I don't know for sure.
I know, I know, for generated code there's no real reason to use a ternary
expression, but coding habits are hard to break, even when writing meta-code
Regards,
-- TB