[問題] 「??」符號語法
這是我從ASP.NET MVC擷取出來的片段程式碼如下
public ApplicationUserManager UserManager {
get
{
return _userManager ??
HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>();
}
private set
{
_userManager = value;
}
}
小弟C#語法不熟,可請問前輩,
程式中的「??」符號是什麼意思?
大概怎麼用呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 219.85.176.102
※ 文章網址: http://www.ptt.cc/bbs/C_Sharp/M.1407223358.A.89E.html
推
08/05 15:28, , 1F
08/05 15:28, 1F
→
08/05 17:31, , 2F
08/05 17:31, 2F
推
08/05 19:48, , 3F
08/05 19:48, 3F
→
08/05 20:06, , 4F
08/05 20:06, 4F
→
08/05 20:29, , 5F
08/05 20:29, 5F
推
08/05 20:41, , 6F
08/05 20:41, 6F
→
08/05 20:50, , 7F
08/05 20:50, 7F
→
08/05 20:53, , 8F
08/05 20:53, 8F
推
08/05 21:06, , 9F
08/05 21:06, 9F
→
08/05 21:17, , 10F
08/05 21:17, 10F
→
08/05 21:17, , 11F
08/05 21:17, 11F
推
08/05 22:03, , 12F
08/05 22:03, 12F
推
08/05 22:47, , 13F
08/05 22:47, 13F
推
08/06 01:28, , 14F
08/06 01:28, 14F
→
08/06 03:30, , 15F
08/06 03:30, 15F
→
08/06 03:47, , 16F
08/06 03:47, 16F
→
08/06 03:48, , 17F
08/06 03:48, 17F
→
08/06 04:03, , 18F
08/06 04:03, 18F
→
08/06 04:04, , 19F
08/06 04:04, 19F
→
08/06 04:04, , 20F
08/06 04:04, 20F
推
08/06 10:19, , 21F
08/06 10:19, 21F
→
08/06 15:48, , 22F
08/06 15:48, 22F
→
08/06 15:48, , 23F
08/06 15:48, 23F
推
08/06 16:24, , 24F
08/06 16:24, 24F
→
08/06 16:24, , 25F
08/06 16:24, 25F
推
08/06 21:19, , 26F
08/06 21:19, 26F
→
08/07 02:50, , 27F
08/07 02:50, 27F
→
08/07 04:04, , 28F
08/07 04:04, 28F
→
08/07 11:46, , 29F
08/07 11:46, 29F
推
08/07 15:12, , 30F
08/07 15:12, 30F
推
08/07 18:41, , 31F
08/07 18:41, 31F
→
08/07 18:42, , 32F
08/07 18:42, 32F
推
08/07 20:17, , 33F
08/07 20:17, 33F
→
08/07 20:38, , 34F
08/07 20:38, 34F
→
08/07 20:43, , 35F
08/07 20:43, 35F
推
08/10 15:03, , 36F
08/10 15:03, 36F
→
08/10 15:09, , 37F
08/10 15:09, 37F
推
08/10 20:41, , 38F
08/10 20:41, 38F
推
08/15 21:29, , 39F
08/15 21:29, 39F
C_Sharp 近期熱門文章
PTT數位生活區 即時熱門文章