How to use var implicit type with int type in c#

1 Answer

0 votes
using System;
using System.Collections.Generic;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            var a = 123;
            int b = 90;

            Console.WriteLine(a + b);
        }
    }
}

/*
run:

213

*/

 



answered Jan 5, 2017 by avibootz

Related questions

1 answer 163 views
1 answer 197 views
2 answers 181 views
1 answer 350 views
1 answer 189 views
189 views asked Jul 6, 2018 by avibootz
1 answer 167 views
...