Hi!
I'm getting this implement interface member error. I'm not sure, if I'm missing something. Can somebody help me out? thaaaaaanks!
This is the code from the class that derives from the interface :
using System;
namespace Arithmetic
{
/// <summary>
///
/// </summary>
public class Calculations : Arithmetic.ICalculations
{
public Calculations()
{
Numb1 = Numb2 = 0;
}
#region ICalculations Members
public int Operand1
{
get
{
return Numb1;
}
set
{
Numb1 = value;
}
}
public int Operand2
{
get
{
return Numb2;
}
set
{
Numb2 = value;
}
}
public int Add(int a, int b)
{
return (a + b);
}
public int Multiply(int a, int b)
{
return (a * b);
}
public int Subtract(int a, int b)
{
return (a - b);
}
public int Divide(int a, int b)
{
return (a / b);
}
#endregion
private int Numb1;
private int Numb2;
}
}
And here is the code for the interface:
using System;
namespace Arithmetic
{
/// <summary>
///
/// </summary>
interface ICalculations
{
int Operand1
{
get;
set;
}
int Operand2
{
get;
set;
}
int Add();
int Multiply();
int Subtract();
int Divide();
}
}
thank you!!
I'm getting this implement interface member error. I'm not sure, if I'm missing something. Can somebody help me out? thaaaaaanks!
This is the code from the class that derives from the interface :
using System;
namespace Arithmetic
{
/// <summary>
///
/// </summary>
public class Calculations : Arithmetic.ICalculations
{
public Calculations()
{
Numb1 = Numb2 = 0;
}
#region ICalculations Members
public int Operand1
{
get
{
return Numb1;
}
set
{
Numb1 = value;
}
}
public int Operand2
{
get
{
return Numb2;
}
set
{
Numb2 = value;
}
}
public int Add(int a, int b)
{
return (a + b);
}
public int Multiply(int a, int b)
{
return (a * b);
}
public int Subtract(int a, int b)
{
return (a - b);
}
public int Divide(int a, int b)
{
return (a / b);
}
#endregion
private int Numb1;
private int Numb2;
}
}
And here is the code for the interface:
using System;
namespace Arithmetic
{
/// <summary>
///
/// </summary>
interface ICalculations
{
int Operand1
{
get;
set;
}
int Operand2
{
get;
set;
}
int Add();
int Multiply();
int Subtract();
int Divide();
}
}
thank you!!