Firstly I am able to open a particular file programmatically in Visual Studio editor, with the help of How to programmatically open project/solution in already running Visual Studio?.
var dte = Package.GetGlobalService(typeof(_DTE)) as DTE2;
dte.ExecuteCommand("File.OpenFile","Program.cs");
After opening the file, I need to go directly to the line where the function definition starts(function name will be provided before opening the file) programmatically.
Does anyone knows how to go about this?