namespace first
{
public class index
{
int count;
public index()
{
count = 0;
}
public static index operator++(index x)
{
x.count++;
return count;
}
}
class Program
{
static void Main(string[] args)
{
index i = new index();
i++;
Console.WriteLine(i);
}
}
}
when i am typing this program i got the error like.
first.index.operator++(first.index):not all code paths return a value;