Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

++ operator c#

int number = 2;

number ++; //sets number to 3
//is the same to do number = number + 1 but shortest
Comment

operator ++ c#

//Decrement operator (--)
int i = 3;
Console.WriteLine(i);   // output: 3
Console.WriteLine(i--); // output: 3
Console.WriteLine(i);   // output: 2

double a = 1.5;
Console.WriteLine(a);   // output: 1.5
Console.WriteLine(--a); // output: 0.5
Console.WriteLine(a);   // output: 0.5
//Increment operator (++)
int i = 3;
Console.WriteLine(i);   // output: 3
Console.WriteLine(i++); // output: 3
Console.WriteLine(i);   // output: 4

double a = 1.5;
Console.WriteLine(a);   // output: 1.5
Console.WriteLine(++a); // output: 2.5
Console.WriteLine(a);   // output: 2.5
Comment

PREVIOUS NEXT
Code Example
Csharp :: instantiate scale object 
Csharp :: how to do fizzbuzz in c# 
Csharp :: nginx listen on 80 and 443 
Csharp :: make an object disappear from a c# script unity 
Csharp :: unity unparent 
Csharp :: oncollisionenter compare tag 
Csharp :: change array size in unity 
Csharp :: get enum by index c# 
Csharp :: emboss button in android app 
Csharp :: c# list join 
Csharp :: c# stringbuilder to file 
Csharp :: random seed in c# 
Csharp :: c# string to enum conversion 
Csharp :: c# return list 
Csharp :: unity click on 2d object 
Csharp :: Unity banner ad C# 
Csharp :: ef core detach entity 
Csharp :: repeat 10 timesw c# 
Csharp :: unity controls 3d 
Csharp :: Check if two linked lists merge. If so, where? 
Csharp :: c# date 
Csharp :: how to start cmd in c# 
Csharp :: how to save a c# dictionary 
Csharp :: 2d game art 
Csharp :: VLC .net 
Csharp :: unity getcomponent not working on ui 
Csharp :: .net Core Get File Request 
Csharp :: how to split concat string c# 
Csharp :: c# append text to file 
Csharp :: create list c# 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =