CSharp examples for Language Basics:ref
Ref Local Variable
using System;//from ww w. j a v a 2 s . co m using System.ComponentModel; public class RefLocalIntro { static void Main() { int x = 10; ref int y = ref x; x++; y++; Console.WriteLine(x); } }