D
DaTurk
I have three interfaces, lets call them General, Client, Server.
public interface General
{
public Value{get;}
}
public interface Client : General
{}
public interface Server: General
{
public Value{set;}
}
public class Something : Server, CLient{
}
public class Test{
Something a = new Something();
a as General;
a.Value = 5;
}
THis is essentially what I'm trying to do, but all three interfaces are
in MCPP and for some reason when I try to write to the property Value
it says it can not be accessed. What am I doing wrong? Here is the
actual interface code below, I'll trim out the extraneous methods.
#pragma once
namespace Provider
{
public __gc __interface General : public IDisposable
{
public:
__property NameValueCollection* get_Parameters(void);
};
};
#pragma once
#include "General.h"
namespace Provider
{
public __gc __interface Server : public General
{
public:
__property void set_Parameters(NameValueCollection
*parameters);
};
};
and the CLient, or third interface just adds an additional method. All
I'm trying to do is have the classes that implement server be able to
set properties, and otherwise they can only get them. Thank you in
advance for any help.
public interface General
{
public Value{get;}
}
public interface Client : General
{}
public interface Server: General
{
public Value{set;}
}
public class Something : Server, CLient{
}
public class Test{
Something a = new Something();
a as General;
a.Value = 5;
}
THis is essentially what I'm trying to do, but all three interfaces are
in MCPP and for some reason when I try to write to the property Value
it says it can not be accessed. What am I doing wrong? Here is the
actual interface code below, I'll trim out the extraneous methods.
#pragma once
namespace Provider
{
public __gc __interface General : public IDisposable
{
public:
__property NameValueCollection* get_Parameters(void);
};
};
#pragma once
#include "General.h"
namespace Provider
{
public __gc __interface Server : public General
{
public:
__property void set_Parameters(NameValueCollection
*parameters);
};
};
and the CLient, or third interface just adds an additional method. All
I'm trying to do is have the classes that implement server be able to
set properties, and otherwise they can only get them. Thank you in
advance for any help.