Self decrease : Operators : Language Basics C# Source Code


Custom Search

C# Source Code » Language Basics » Operators »

 

Self decrease









    

/*
Learning C# 
by Jesse Liberty

Publisher: O'Reilly 
ISBN: 0596003765
*/

 using System;
 public class SelfMiValues
 {
     static void Main()
     {
         int original = 10;
         int result;

         // increment then assign
         result = --original;
         Console.WriteLine("After prefix: {0}, {1}", original,
             result);

         // assign then increment
         result = original--;
         Console.WriteLine("After postfix: {0}, {1}",
             original, result);
     }
 }
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Language Basics
» Operators