How to start appium server programmatically for v 1.6.5 using c#

Hai Team,
I would like to handle (Start and Stop instances) appium server V 1.6.5 by my code using c#. I have tried the following code ,
/*******/
AppiumLocalService service = AppiumLocalService.BuildDefaultService();
service.Start();

/*******/

and also the following code as well,

/*******/

System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.FileName = “cmd.exe”;
startInfo.Arguments = “/C C:/Program Files/nodejs/node.exe C:/Users/MyName/AppData/Local/Programs/appium-desktop/resources/app/node_modules/appium/lib/appium.js --address 127.0.0.1 --port 4723 --automation-name Appium --log-no-color”;
process.StartInfo = startInfo;
process.Start();

/*******/

But i keep on getting the following error,

An exception of type ‘System.InvalidOperationException’ occurred in WebDriver.dll but was not handled in user code

Additional information: A new session could not be created. Details: Problem getting session data for driver type AndroidDriver; does it implement ‘get driverData’? (33)

But Why? Thanks in advance…

How to start appium server grammatically using C#.I have the below code.It is not working for me.Anyone of you.Can you please help me with it.

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace StoreTicketingApp.AppiumSupport

{
public static void main() {
class Appium_Test
{

    System.Diagnostics.Process process = new System.Diagnostics.Process();
    System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
    startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
    startInfo.FileName = "C:\\Users\\azargar\\AppData\\Local\\Programs\\Appium\\Appium.exe";
     System.Diagnostics.Process process = new System.Diagnostics.Process();
    System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
    startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
    startInfo.FileName = "C:\\Users\\azargar\\AppData\Local\\Programs\\Appium\\Appium.exe";
    startInfo.Arguments = @"""C:/Program Files (x86)/Appium/node_modules/appium/bin/appium.js"" --address 127.0.0.1 --port 4723 --automation-name Appium --log-no-color";
    process.StartInfo = startInfo;
    process.Start();
    appium_started = true;


}

}
}