Below is the simple console application written in C#
using System;
public class Hello
{
public static void Main (string[] args)
{
Console.WriteLine(“Hello tutorialz.tk”);
}
}
using System; “System” is a namespace and the “using” directive says that all classes in the “System” namespace can be used in this class without using the fully qualified name. In our class, “Console” is a class in the namespace “System”. To use this class you have to actually write : System.Console.WriteLine (“…”);
But the using System; directive on top of the class allows us to use the class without including the namespace. So, you can now simply write :
Console.WriteLine(“…”);
If you are familiar with Object Oriented Programming, you might not need more explanation for the next line – declaring a class.
public static void Main (string[] args) – is the Main method, which is the starting point of the application.
string[] args is the list of arguments that are passed to this application. (In our case, we are not passing any command line parameters).
Console.WriteLine(“…”) is another line of important code. Console is a class, part of .NET class library included in System namespace. WriteLine is a method part if this class and used to print output to the default Console.
Incoming search terms:
- console application in c sharp tutorial (7)
- c# console application tricks (5)
- simple console application in C# (4)
- simple console application in c sharp (3)
- c# console application mysql (3)
- interview question of c# console application (3)
- c# console application tutorial (3)
- C# console application tutorials (3)
- c# simple console application (3)
- interview questions for console application in csharp (3)
- pdf c# console application (2)
- c sharp tutorial using console application pdf (2)
- simple console application (2)
- console application javascript (2)
- console application in c# pdf (2)
- c# question and answer slideshow (2)
- simple c# console calculator (2)
- c# console application interview questions and answers (2)
- interview questions and answers on c# console applications (2)
- console application grading system in c# (2)
- sample console application in c sharp (2)
- interview questions on console application in C# (2)
- c# console for javascript (2)
- simple c console application (2)
- console application tips (2)
- using parameters to filter data in c sharp console app (2)
- c sharp calculator console app text (2)
- c sharp console (2)
- Interview based programs in c#console application (2)
- c sharp console application interview question for fresher (2)
- c sharp console application pdf (2)
- tips to write console application in csharp for an interview (2)
- c sharp console application tutorial (2)
- c sharp console application tutorial pdf (2)
- simple console program to display details (2)
- C# console add javascript to pdf (2)
- csharp console application tutorial (2)
- how to show a text on console application in c# (1)
- how to run javascript in c# console application? (1)
- cshap console application tutorials (1)
