I am no expert on attributes, but I have used them, but I am stumped by this
one ...
basically is it possible to get the attributes from a method used as a
delegate?
For example, I have a method called
[TileSizeAttribute(40, 70)]
private void listView1_DrawItem(object sender, DrawListViewItemEventArgs e)
{
// stuff
}
that I am setting via ...
listView1.DrawItem =+ listView1_DrawItem
Then in DrawItem I would like to grab the TileSizeAttribute information, but
I don't seem to be getting it?
I have tried ...
public new event DrawListViewItemEventHandler DrawItem
{
add {
Type type = value.GetType();
TileSizeAttribute a =
(TileSizeAttribute)Attribute.GetCustomAttribute(ty pe,
typeof(TileSizeAttribute));
but a is null ... Anyone have any suggestions how I should proceed?