The following code is an example of what I want this doesn't compile however, and I know to little about C# generics to fix it.
[source lang="csharp"]
public abstract class IAttributeHandle : Handle
{
public IAttributeHandle() : base()
{
}
public IAttributeHandle(String name) : base(name)
{
}
public abstract T Value
public abstract void setValue
}
public abstract class AttributeTypeHandle
{
public AttributeTypeHandle() : base()
{
m_type = typeof(T);
}
public AttributeTypeHandle(String name, T value) : base(name)
{
m_type = typeof(T);
m_value = value;
}
public override T Value
{
return m_value;
}
public override void setValue
{
m_value = value;
}
protected T m_value;
}
[/source]
There are more derived types of this class with definitions like the following:
[source lang="csharp"]
class BoolHandle : AttributeTypeHandle
{
}
[/source]
PS: not sure whats gone wrong but the highlight tags won't work for me