J
John
Hi,
I have a ToolbarButton and I want to print out the instance name. This
is easy to do with objects that inherit from Control because there is
a .Name property. However, with other objects like ToolbarButton I
don't see how to do this.
Advice? Ideas? THANKS!
ToolbarButton tbbMyButton;
public static void ShowName(object o)
{
if ( o is ToolbarButton )
{
Console.Writeline(tbbMyButton.Name); // Doesn't work, no Name
property
}
}
Maybe something with reflection?
Thanks!!!
John
I have a ToolbarButton and I want to print out the instance name. This
is easy to do with objects that inherit from Control because there is
a .Name property. However, with other objects like ToolbarButton I
don't see how to do this.
Advice? Ideas? THANKS!
ToolbarButton tbbMyButton;
public static void ShowName(object o)
{
if ( o is ToolbarButton )
{
Console.Writeline(tbbMyButton.Name); // Doesn't work, no Name
property
}
}
Maybe something with reflection?
Thanks!!!
John