E
evgeniy81
From rsdn.ru forum http://rsdn.ru/Forum/Message.aspx?mid=2454202.
When i try to compile something like this with c# 2.0 compiler there
is a compile time error.
class Foo {
public int F(bool a, int b)
{
return 2;
}
public void runTest()
{
int a = 5;
int b = 6;
int c = 7;
int blah = F(a<b, c >> 2);// compilation error
Console.WriteLine("Blah = " + blah);
}
}
It occurs only when i use "less than"operator.
But if conclude "a<b" expression into round brackets "(a<b)" error
will not occur. Is "less then operator reloaded or this is compiller
bug?
When i try to compile something like this with c# 2.0 compiler there
is a compile time error.
class Foo {
public int F(bool a, int b)
{
return 2;
}
public void runTest()
{
int a = 5;
int b = 6;
int c = 7;
int blah = F(a<b, c >> 2);// compilation error
Console.WriteLine("Blah = " + blah);
}
}
It occurs only when i use "less than"operator.
But if conclude "a<b" expression into round brackets "(a<b)" error
will not occur. Is "less then operator reloaded or this is compiller
bug?