Related:
Hide a C# program from the task manager?
https://stackoverflow.com/questions/759466/is-it-possible-to-hide-console-c-application-from-task-manager
Short answer is: no, you can't (legally) hide it from Task manager, unless you wrap it with a Windows service. There are various ways of preventing your application from closing.