Не может неявно преобразовать тип «двойной» в «длинное»C#

Место общения программистов C#
Anonymous
Не может неявно преобразовать тип «двойной» в «длинное»

Сообщение Anonymous »

В этом коде я получил вышеуказанную ошибку в строках, которые я прокомментировал. < /p>

public double bigzarb(long u, long v)
{
double n;
long x;
long y;
long w;
long z;
string[] i = textBox7.Text.Split(',');
long[] nums = new long[i.Length];
for (int counter = 0; counter < i.Length; counter++)
{
nums[counter] = Convert.ToInt32(i[counter]);
}

u = nums[0];
int firstdigits = Convert.ToInt32(Math.Floor(Math.Log10(u) + 1));
v = nums[1];
int seconddigits = Convert.ToInt32(Math.Floor(Math.Log10(v) + 1));
if (firstdigits >= seconddigits)
{
n = firstdigits;

}
else
{
n = seconddigits;
}
if (u == 0 || v == 0)
{
MessageBox.Show("the Multiply is 0");
}

int intn = Convert.ToInt32(n);
if (intn

В чем проблема? Спасибо!

Подробнее здесь: https://stackoverflow.com/questions/448 ... le-to-long

Вернуться в «C#»