05-20-2005, 11:58 AM
And this is with two methods and two properties.
When compiling C#, exit QM, because the type library is locked by QM.
When compiling C#, exit QM, because the type library is locked by QM.
using System;
namespace ClassLibrary2
{
public interface IArithmetic
{
int AddIntegers(int a, int b);
string AddStrings(string a, string b);
int Prop1
{
get;
set;
}
string Prop2
{
get;
}
}
/// <summary>
/// Summary description for Class1.
/// </summary>
public class Arithmetic :IArithmetic
{
int m_prop1;
string m_prop2;
public Arithmetic()
{
//
// TODO: Add constructor logic here
//
m_prop1=0;
m_prop2="aaaaaaa";
}
#region IArithmetic Members
public int AddIntegers(int a, int b)
{
// TODO: Add Arithmetic.AddIntegers implementation
return a+b;
}
public string AddStrings(string a, string b)
{
return a+b;
}
public int Prop1
{
get
{
return m_prop1;
}
set
{
m_prop1=value;
}
}
public string Prop2
{
get
{
return m_prop2;
}
}
#endregion
}
}