G
Glenn Roberts
Hi,
I've been using CodeDom to generate and compile source code...
.....but, have found that in the CodeBinaryOperatorType (used when making a
CodeBinaryOperatorExpression), there is no "not equal"
.....there are the usual, equals, greater than etc...but no, not equals.
I would have thought not equals is also a common enough relation.
What is the easiest way to represent a not equals ?
I have 2 expressions, and simply want to say something like;
if ( a != b )
{
...etc
}
I have the 2 expressions, a and b, represented as CodeDom objects...and
simply want to see if they are not equal. I'm not sure if I could use a
CodeSnippet somehow, to combine them ?
I don't seem to be able to use a "not" operator. to try and do an equals,
and then negate it..
...because, annoyingly, there is no "not" operator either...
I guess I could do something like,
if ( ( a> b) | ( a < b) )
but..this seems pretty messy !
any advice appreciated,
thanks !
I've been using CodeDom to generate and compile source code...
.....but, have found that in the CodeBinaryOperatorType (used when making a
CodeBinaryOperatorExpression), there is no "not equal"
.....there are the usual, equals, greater than etc...but no, not equals.
I would have thought not equals is also a common enough relation.
What is the easiest way to represent a not equals ?
I have 2 expressions, and simply want to say something like;
if ( a != b )
{
...etc
}
I have the 2 expressions, a and b, represented as CodeDom objects...and
simply want to see if they are not equal. I'm not sure if I could use a
CodeSnippet somehow, to combine them ?
I don't seem to be able to use a "not" operator. to try and do an equals,
and then negate it..
...because, annoyingly, there is no "not" operator either...
I guess I could do something like,
if ( ( a> b) | ( a < b) )
but..this seems pretty messy !
any advice appreciated,
thanks !