CSharp examples for Language Basics:Operator
Multiplication has greater priority
using System;/*from ww w .j av a2 s . c o m*/ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { // Multiplication has greater priority Console.WriteLine(1 + 2*3); // Forcing priority using parentheses Console.WriteLine((1 + 2)*3); } }