Go To Definition
和Go To Implementation
Visual Studio 之间有什么区别?
版本: Visual Studio 2015 Update 1
假设我们有这个界面:
public interface IEmailSender { Task SendEmailAsync(string email, string subject, string message); }
以及实现此接口的类:
public class AuthMessageSender : IEmailSender { public Task SendEmailAsync(string email, string subject, string message) { // Plug in your email service here to send an email. return Task.FromResult(0); } }
如果我们右键单击IEmailSender
并选择Go To Implementation,Visual Studio会将我们导航到实现此接口的类,即AuthMessageSender
.
如果我们IEmailSender
在AuthMessageSender
课堂上右键单击并
选择Go To Definition,则Visual Studio会将我们导航到该定义IEmailSender
.