Dear Sir,
I have an error `Error CS0221 Constant value '-1' cannot be converted to a 'ulong' (use 'unchecked' syntax to override) and Error CS0019 Operator '>' cannot be applied to operands of type 'bool' and 'bool'`
Please Guide me
public static RColor FromArgb(int alpha, int red, int green, int blue)
{
RColor.CheckByte(alpha);
RColor.CheckByte(red);
RColor.CheckByte(green);
RColor.CheckByte(blue);
'below error CS0221 Constant value '-1' cannot be converted to a 'ulong' (use 'unchecked' syntax to override)`
return new RColor((long)((ulong)(red << 16 | green << 8 | blue | alpha << 24) & (ulong)-1));
}
private static string DecodeHtmlCharByCode(string str)
{
for (int i = str.IndexOf("&#", StringComparison.OrdinalIgnoreCase); i > -1; i = str.IndexOf("&#", i + 1))
{
bool flag = str.Length > i + 3 && char.ToLower(str[i + 2]) == 'x';
'below Error CS0019 Operator '>' cannot be applied to operands of type 'bool' and 'bool'`
int num = i + 2 + ((flag > false) ? 1 : 0);
long num2 = 0L;
while (num < str.Length && CommonUtils.IsDigit(str[num], flag))
{
num2 = num2 * (flag ? 16L : 10L) + (long)CommonUtils.ToDigit(str[num++], flag);
}
num += ((num < str.Length && str[num] == ';') ? 1 : 0);
string value = string.Empty;
if (num2 >= 0L && num2 <= 1114111L && (num2 < 55296L || num2 > 57343L))
{
value = char.ConvertFromUtf32((int)num2);
}
str = str.Remove(i, num - i);
str = str.Insert(i, value);
}
return str;
}