Name: Anonymous 2012-06-29 2:50
I feel really stupid asking for help for something like this but i just can't see where the fuck is the problem. The compiler only say that it can't be assigned 'SetX' because is a 'group of methods'
namespace area
{
class Rectangulo
{
private int X;
private int Y;
public int GetX()
{
return X;
}
public int GetY()
{
return Y;
}
public bool SetX(int ValX)
{
if(ValX!=Y)
{
X=ValX;
return true;
}
else
return false;
}
public bool SetY(int ValY)
{
if(ValY!=X)
{
Y=ValY;
return true;
}
else
return false;
}
}
class Program
{
public static void Main(string[] args)
{
int m;
int n;
int a;
Rectangulo R1=new Rectangulo();
R1.SetX=m;
R1.SetY=n;
a=m*n;
Console.WriteLine(a);
Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);
}
}
}
Anyone, help
namespace area
{
class Rectangulo
{
private int X;
private int Y;
public int GetX()
{
return X;
}
public int GetY()
{
return Y;
}
public bool SetX(int ValX)
{
if(ValX!=Y)
{
X=ValX;
return true;
}
else
return false;
}
public bool SetY(int ValY)
{
if(ValY!=X)
{
Y=ValY;
return true;
}
else
return false;
}
}
class Program
{
public static void Main(string[] args)
{
int m;
int n;
int a;
Rectangulo R1=new Rectangulo();
R1.SetX=m;
R1.SetY=n;
a=m*n;
Console.WriteLine(a);
Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);
}
}
}
Anyone, help