Generic type can have ref and out modifier. using System;class Test{ static void print(ref T t) { Console.WriteLine(t); } static void Main() { string str = "asdf"; print(ref str); }}The output:asdf