2013-02-03 77 views

回答

5

禮貌反射的:

public static class WebSecurity 
{ 
    ... 

    public static string CurrentUserName 
    { 
     get 
     { 
      return Context.User.Identity.Name; 
     } 
    } 

    ... 
}  

因此,讓我們回答您的問題:

什麼User.Identity.NameWebSecurity.CurrentUserName之間的區別?

無。

我可以交替使用它們嗎?

是的。

相關問題