I get the following error when the code below is compiled
Error 1 The left-hand side of an assignment must be a variable, property or indexer C:\Users\numerical25\AppData\Local\Temporary Projects\ConsoleApplication1\Program.cs 16 22 ConsoleApplication1
Can someone tell me whats wrong
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
for (int i = 1; i < 40; i++)
{
if ((i % 10) = 0)
{
}
}
}
}
}
Loading
Aleksandar IlioskiPosted Mar 22, 2009, 9:03 PM
haha you are right it is simple question:)
your answer is..:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
for (int i = 1; i < 40; i++)
{
if ((i % 10) == 0)// you need "=" twice
{
}
}
}
}
}