I am trying to extract attribute. Attribute are custom attributes. 
But some how i am not able to use object.id thing.
For example my commented code adpter.id is not valid, even you see i have converted that object to its type.
Here is the code for the attribute:
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
public class Adapter : Attribute
{
// This class implements the Adapter Attribite
readonly int id;
readonly string Title;
public string Comment { get; set; }
private string[] Relation;
public Adapter(int id, string Title,string []relations)
{
this.id = id;
this.Title = Title;
this.Relation = relations;
}
}
The default visibility for fields is private, try to make
idandTitlepublic.You could also change the fields to properties with a private setter like this:
Or to readonly properties:
As it is considered bad design to create public fields.