hello josh, first of all thanks for your reply, thank you all guys it
has been great to witness all these action and try to learn from it.
the following code works for me, i only have access to the properties
and methods that i want, but i am not quite sure that i doing this
right, i mean it could have been done without interfaces in the
following code and it would have worked, so appearntly i didnt quite get
it and as this newsgroups are my only source of learning so far i would
appreciate feedbacks and comments as much as possilbe, whatz the trick
??!!
interface IData
{
int ClientInfo { get;set;}
int OrderInfo { get;set;}
}
interface IClient
{
int ClientInfo { get;}
}
interface IAdministrator
{
int ClientInfo { get;set;}
int OrderInfo { get;set;}
}
class Data : IData
{
private int clientInfo = 0;
private int orderInfo = 0;
public Data()
{
this.clientInfo = clientInfo;
this.orderInfo= orderInfo;
}
public int ClientInfo
{
get { return this.clientInfo ; }
set { this.clientInfo = value; }
}
public int OrderInfo
{
get { return this.orderInfo; }
set { this.orderInfo = value; }
}
}
class Client : IClient
{
Data data = new Data();
public Client()
{
this.data = data;
}
public int ClientInfo
{
get { return data.ClientInfo ; }
}
}
namespace WebApplication1 2
{
class Administrator : IAdministrator
{
private IData data = null;
public Administrator()
{
this.data = data;
}
public int ClientInfo
{
get
{
return data.ClientInfo ;
}
set
{
this.data.Clien tInfo = value;
}
}
public int OrderInfo
{
get { return this.data.Order Info; }
set { this.data.Order Info = value; }
}
}
Sharing makes All the Difference
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com