How to parse short value from a string in C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = "893";

            short s = short.Parse(str);

            Console.WriteLine(s);
        }
    }
}

/*
run:
   
893

*/

 



answered Jan 17, 2017 by avibootz

Related questions

1 answer 302 views
1 answer 314 views
1 answer 259 views
259 views asked Jan 18, 2017 by avibootz
2 answers 367 views
4 answers 449 views
449 views asked Jan 18, 2017 by avibootz
1 answer 273 views
...