The + Operator Is Left Associative : Operators : Language Basics C# Source Code


Custom Search

C# Source Code » Language Basics » Operators »

 

The + Operator Is Left Associative








    
 


using System;

public class MainClass {
    public static void Main() {

        Console.WriteLine(10 + 25 + "A");   // Same as (10 + 25) + "A", that is "35A" 
        Console.WriteLine("A" + 10 + 25);   // Same as ("A" + 10) + 25, that is "A1025" 

    }

}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Language Basics
» Operators