CSharp examples for Language Basics:ref
Ref Return As Ref Argument
using System;//from w w w . j av a2s. c om using System.ComponentModel; class RefReturnSimpleNoLocal { static void Main() { int x = 10; RefReturn(ref x)++; Console.WriteLine(x); } static ref int RefReturn(ref int p) { return ref p; } }