Skip to main content

Implementing Program.cs

The Program.cs file is generated automatically when you create a new program (the other classes have to be created). All you have to change is the Main() method. It should contain a call to the Run method to a new instance of QvEventLogServer.cs reference.

In the following code example, a check has been put in place to verify the existence and format of the arguments to pass to the new instance of QvEventLogServer.

using System;

 

namespace QvEventLogConnector

{

static class Program

{

/// <summary>

/// The main entry point for the application.

/// </summary>

[STAThread]

static void Main(string[] args)

{

if (args != null && args.Length >= 2)

{

new QvEventLogServer().Run(args[0], args[1]);

}

}

}

}

The next step is Implementing QvEventLogServer.cs.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!