# Self decrease : Operators « Language Basics « C# / C Sharp

Home
C# / C Sharp
 1 2D Graphics 2 Class Interface 3 Collections Data Structure 4 Components 5 Data Types 6 Database ADO.net 7 Date Time 8 Design Patterns 9 Development Class 10 Event 11 File Stream 12 Generics 13 GUI Windows Form 14 Internationalization I18N 15 Language Basics 16 LINQ 17 Network 18 Office 19 Reflection 20 Regular Expressions 21 Security 22 Services Event 23 Thread 24 Web Services 25 Windows 26 Windows Presentation Foundation 27 XML 28 XML LINQ
 C# / C Sharp » Language Basics » Operators Screenshots
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);      }  }                         ```
Related examples in the same category
 1 The + Operator Is Left Associative 2 Math Operators with int value 3 Demonstrate the difference between prefix postfix forms of ++ 4 Demonstrate the relational and logical operators 5 Demonstrate the short-circuit operators 6 Side-effects can be important 7 Prevent a division by zero using the ? 1 8 Self increment 9 Illustrates the use of the comparison operators 10 Illustrates the use of the Boolean logical operators 11 Ternary operator 12 Illustrates the use of the ternary operator 13 Illustrates the use of the arithmetic operators 14 Illustrates the use of the bitwise operators 15 Illustrates the use of the shortcut operators 16 Prefix and postfix versions of the increment and decrement operators 17 Operator precedence 18 Demonstrates compound assignment operators 19 Relational Operators 3 20 Numeric Operators 3 21 Numeric Operators 1 22 Relational Operators 23 control the operator evaluation sequence 24 'logical and' and bitwise and 25 logical or and bitwise or 26 And Assignment 27 Or Assignment 28 Iff operator in C# 29 logical exclusive-or 30 Conditional operator and Math calculation 31 Add Assigment for both number and string value