Where does the .NET C# program start its flow when you build and run a console application?
Experience Level: Junior
Tags: C#
Answer
When a user starts a .NET console application, the class Program
is located. Within this class the method Main
is located an the code execution flow starts from there, statement by statement, line by line.
When the application below gets executed, the first command to be executed will be Console.WriteLine("Hello");.
Related C# job interview questions
What is a solution in Visual Studio and what file extension does it have?
C# JuniorWhat is a difference between .cs file and class?
C# JuniorWhat is an object in C#?
C# JuniorWhat is a class in C#?
C# JuniorWhat are the advantages of using 'using' keyword in C# and why would you use it?
C# Junior