-4

if ((uint)(-(num2 == num3 ? 1 : 0) & str.IndexOf("}") & -(str.IndexOf("#include") == -1 ? 1 : 0)) > 0U && str.IndexOf("(") != -1)

after i fixed the num1 and num7 values i get and overflow error in this line

rod
  • 1
  • 1
  • Above duplicate was found by copying your question title into google. Please do your own research/effort first. – Sayse Nov 27 '15 at 12:41
  • There are millions.. no, not millions, BILLIONS article on Google about that error message. – Soner Gönül Nov 27 '15 at 12:48
  • reading error message would also be great: you are using (getting) the value of a variable before setting a value for it. – Gian Paolo Nov 27 '15 at 12:58

2 Answers2

3

You haven't assigned a value to num1 or num7.

in your code, you have the below:

checked { ++num7; }

However, you didn't initialise num7, and you can't add 1 to a null value. You need to initialise num7.

long num7 = 0;

You should also intialise num1 in the same way.

There's probably a lot easier way to do whatever it is you are trying to do as well.

Also, you aren't using some variables. I see num4 is assigned a value, but it is only ever used to initialise num6. The same can be said for num2, so is there any point in even having them?

user1666620
  • 4,800
  • 18
  • 27
2

In a method scope, you must initialize local variable :

long num1 = 0; 
long num7 = 0;
Perfect28
  • 11,089
  • 3
  • 25
  • 45