A
Albert Krüger
Hello,
I want to cast a System.ComponentModel.Component to a
System.Windows.Forms.Timer. In the help of the .net framework I read that
System.Windows.Forms.Timer inherits from the
System.ComponentModel.Component. But always I get a runtime error when I try
to cast.
Where is my mistake?
objTimer = DirectCast(objComponent, System, System.Windows.Forms.Timer)
'System.InvalidCastException
Thanks
Albert Krüger
I want to cast a System.ComponentModel.Component to a
System.Windows.Forms.Timer. In the help of the .net framework I read that
System.Windows.Forms.Timer inherits from the
System.ComponentModel.Component. But always I get a runtime error when I try
to cast.
Where is my mistake?
objTimer = DirectCast(objComponent, System, System.Windows.Forms.Timer)
'System.InvalidCastException
Thanks
Albert Krüger