Your first Hello World app in C# Sharp

Your first Hello World app in C# Sharp. In our tutorial, we will be using the functionSystem.Console.WriteLine to write lines to the output console. When writing a C# command line application, the same function can also be used to print to the console.

Note: Writing web applications using C# is possible using the ASP.NET framework.

Exercise: Your first Hello World app in C# Sharp

Print a message to the console. The code below prints Hello World to the screen using System.Console.WriteLine go ahead and output other messages other than ‘Hello World’… The more you code the more you know.

Your first Hello World app in C# Sharp

This method uses the composite formatting feature of the .NET Framework to convert the value of an object to its text representation and embed that representation in a string. The resulting string is written to the output stream.

The format parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to an object in the parameter list of this method. The formatting process replaces each format item with the text representation of the value of the corresponding object.

The syntax of a format item is {index[,alignment][:formatString]}, which specifies a mandatory index, the optional length and alignment of the formatted text, and an optional string of format specifier characters that govern how the value of the corresponding object is formatted.

The .NET Framework provides extensive formatting support, which is described in greater detail in the following topics.

For more information about the line terminator, see the Remarks section of the WriteLine method that takes no parameters.

Related Videos: Related Videos.

Related Links:

MSDN on Console.WriteLine Method

Introduction to Batch File Viruses

Hello World Android app built with Android Studio

Introduction to JavaScript – CONSOLE

Connected through code, Choose Your Platform!

About the Author: Bernard Aybout

In the land of bytes and bits, a father of three sits, With a heart for tech and coding kits, in IT he never quits. At Magna's door, he took his stance, in Canada's wide expanse, At Karmax Heavy Stamping - Cosma's dance, he gave his career a chance. With a passion deep for teaching code, to the young minds he showed, The path where digital seeds are sowed, in critical thinking mode. But alas, not all was bright and fair, at Magna's lair, oh despair, Harassment, intimidation, a chilling air, made the workplace hard to bear. Management's maze and morale's dip, made our hero's spirit flip, In a demoralizing grip, his well-being began to slip. So he bid adieu to Magna's scene, from the division not so serene, Yet in tech, his interest keen, continues to inspire and convene.