Hi guys,
Following on from my questions earlier about plugins I've got another stumbling block to get over.
I've got an object say "Person". This person has 2 fields - age and name. This lives in the UI project.
Now i've got a DLL that implements the following interface:
public interface myStoragePlugin:IPlugins
{
void write(object toAdd);
object getAll();
}
the DLL that implements this interface takes these methods and writes to XML. Or rather heres the problem. I call this code in the UI after I've loaded the module. On calling write(new Person());
The plugin doesn't know what fields are coming from the type object. And it doesn't appear to want to refect so I can't build a list of field attributes.
In my DLL method I have this...
...
public void Add(Object toAdd)
{
typeof( toAdd );
}
Why does this generate the following error:
Error 2 The type or namespace name 'toAdd' could not be found (are you missing a using directive or an assembly reference?) C:\Users\John\Desktop\XmlPlugin\Class1.cs 16 21 XmlPlugin