Skip to content

Instantly share code, notes, and snippets.

@mletterle
Last active December 22, 2015 09:58
Show Gist options
  • Save mletterle/6455233 to your computer and use it in GitHub Desktop.
Save mletterle/6455233 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int x = 1;
int y = 1;
var p = new Program();
p.PrintThis(x, y); //Outputs: x: 1, y: 1
p.PrintThis(++x, y++); //Outputs: x: 2, y: 1
p.PrintThis(x, y); //Outputs: x: 2, y: 2
Console.ReadLine();
}
public void PrintThis(int x, int y)
{
Console.WriteLine("x: {0}, y: {1}", x, y);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment