Console.WriteLine("Hello World");
Console.WriteLine(/*something like "hello"*/);
Console.Write(/*something like "hello"*/);
MessageBox.Show("Hello World");
Console.WriteLine("Prints on a new line");
Console.Write("Prints on the same line");
Console.WriteLine(/* your content here */);
Console.WriteLine("Hello Guys");
string s = text;
PrintDocument p = printDocument1;
p.PrinterSettings.PrinterName = printer;
if (print)
{
p.PrintPage += delegate (object sender1, PrintPageEventArgs e1)
{
e1.Graphics.DrawString(s, font, new SolidBrush(Color.Black), new RectangleF(0, 0, p.DefaultPageSettings.PrintableArea.Width, p.DefaultPageSettings.PrintableArea.Height));
};
try
{
p.Print();
}
catch (Exception ex)
{
throw new Exception("Exception Occured While Printing", ex);
}
}
Console.Write("hello World!")