I've recently started to port a project to C# from VB, so I apologize if this is a noob-ish question. I can't seem to get this process to work for the life of me:
Process p = default(Process);
try
{
p.Start("powershell",
"-ExecutionPolicy ByPass -windowstyle hidden -file .\\scripts\Excel.ps1");
}
catch(Exception ex)
{
}
I'm getting several errors:
Unrecognized escape sequence
Member Process.Start(string, string) cannot be accessed with an instance reference; qualify it with a type name instead.
Any help would be appreciated.
EDIT: I'm moving from VB.net to C# because I prefer the syntax of C#, (coming from a java background) but I don't know a ton of C# visual studio workings.
EDIT2: Fixed the quotes with an @, still getting the
- Member Process.Start(string, string) cannot be accessed with an instance reference; qualify it with a type name instead
error.