开发者

C# Process Start: Programmatically open .cs file and navigate to line number

开发者 https://www.devze.com 2022-12-07 22:43 出处:网络
I\'m curious if there is a way for a .cs file to programmatically open and navigate to a c# line of code (similar to ctrl + g)

I'm curious if there is a way for a .cs file to programmatically open and navigate to a c# line of code (similar to ctrl + g) via

public static System.Diagnostics.Process Start (string fileName, **string arguments**);

Is it possible to use the overload string arguments to accomplish this?

I am currently usin开发者_运维百科g the single argument Process.Start() to open the .cs file and am copying the line# to clipboard, but the user still need to press ctrl+g && ctrl+v which is what I am trying to eliminate.

Clipboard.SetText(dr["Line"].ToString());
System.Diagnostics.Process.Start(Path.Combine(dr["Folder"].ToString(), dr["Filename"].ToString()));
0

精彩评论

暂无评论...
验证码 换一张
取 消