Header Ads Widget

Responsive Advertisement

Ticker

6/recent/ticker-posts

How to create Console Application or Scheduler or Processor in Visual Studio 2022 using C#

 Open VS-2022 -> Create New Project -> Search Console App -> Select -> Next.



Enter Project Name and path -> Click Next


Keep framework as it is: - Click Create

Here New project has been created:


In Program.cs file – You don’t have any default class program. Delete all lines and add below lines:


Program:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

 

namespace Code_Test

{

    class Program

    {

        static void Main(string[] args)

        {

            string message = "Hello World!!";

 

            Console.WriteLine(message);

        }

    }

}

Run the program using F5 or using below option.


 

Output:


Same way you can write your business logic Inside main function.


Happy Coding!


Thanks 😊

Post a Comment

0 Comments