Using this to check if c is an instance of TForm.
c.GetType().Name.CompareTo("TForm") == 0
Is there a more type safe way to do it besides using a string as a param to CompareTo()?
Using this to check if c is an instance of TForm.
c.GetType().Name.CompareTo("TForm") == 0
Is there a more type safe way to do it besides using a string as a param to CompareTo()?
A little more compact than the other answers if you want to use c as a TForm:
if(c is TForm form){
form.DoStuff();
}