Ok friends instead of going through c# code using Autocad API's I have gone through following alternative i.e creating an acaddoc.lsp file
and writting the following code into it. As my requirements are to be used inside a single folder this things that helped me out is.
(defun S::STARTUP()
(command "ACISOUT" "ALL" "" "")
)
For C#
String progID = "AutoCAD.Application.18";
AcadApplication acApp = (AcadApplication)Marshal.GetActiveObject(progID);
acApp.ActiveDocument.SendCommand("ACISOUT ALL ");
spaces inside the send command works as an enter.