I am trying to verify whether a variable that is passed can be converted to a specific type. I have tried the following but can\'t get it to compile so I assume I\'m going
You can do the int.TryParse() function:
int.TryParse()
int myInt; bool parsed = int.TryParse(myVariable, out myInt); if (parsed) { // Do something with myInt or other logic }