using System;
public class UnaryOperatorsExample1
{
public static void Main()
int unary = 0;
int preIncrement;
int preDecrement;
int postIncrement;
int postDecrement;
int positive;
int negative;
sbyte bitNot;
bool logNot;
preIncrement = ++unary;
preDecrement = --unary;
postDecrement = unary--;
postIncrement = unary++;
Console.WriteLine("Final Value of Unary: {0}", unary);
positive = -postIncrement;
negative = +postIncrement;
bitNot = 0;
bitNot = (sbyte)(~bitNot);
logNot = false;
logNot = !logNot;
}