c# get console output code example Example: c# print console System.Diagnostics.Debug.WriteLine("This is text");