View Single Post
  #5 (permalink)  
Old July 15th, 2010, 09:20 PM
tariq tariq is offline
Authorized User
 
Join Date: Jun 2010
Posts: 27
Thanks: 8
Thanked 0 Times in 0 Posts
Default Operator Priority

According to the book:
* has first priority
/ has second and
% has third
page 51 of Beginning Visual C# 2010

So the corrct answer should be:
resultVar += ((var1 * var2) + (var3 % (var4 / var5)));

Tariq