1. You could call the ToInt32 method to convert an input string to an int:
int numberVar = Convert.ToInt32(“37”);
2.You could also convert a string to an int through the Parse method of the System.Int32 struct:
int numberVar = Int32.Parse(“-37”);
© 2019 HowToASP.NET - All Rights Reserved. Last Updated 09/23/2019 | About Us | Privacy | Terms | Write for UsAll trademarks are property of their legal owners.