I have this line in C ++ code: sects[low].bound = low . Where low is size_t, sects is std::vector<Section> , and Section is a structure with a boolean field bound.
struct Section { //другой код bool bound; }; This disgrace should be ported to C # with which I almost managed. Only this part sects[low].bound = low; : sects[low].bound = low;
A little googling found that in C ++ all integers that are not equal to zero are converted to true, but equal to zero to false, and C # code looks like this: sects[low].Bound = low > 0;
Am I right? If not, how?
sects[low].Bound = low != 0. Negatives are also false. There certainly can not be negative by definition, but for full compliance is necessary. - Johntrue" - Tocic