[c#]回傳型態為物件,回傳值為null
public RectangleF GetCollisionMBR()
{
//...
return bCollisionMBRExists ? rfCollisionBoundingBox : null;
} ↑ ↑
bool RectangleF
跑出錯誤
Type of conditional expression cannot be determined because there is no
implicit conversion between 'System.Drawing.RectangleF' and '<null>'
請問這裡要怎麼改?
感謝大德!
--
╮═╦═╮╮ ╭╭═╮╭═╮╮═╦═╮╭═╮Don't hold me with your eyes.
║ ║ ║║ ║║ ║║ ║║ ║ ║╠═╯The light in them I cannot see.
║ ║ ║╰═╣╰═╣╰═╰║ ║ ║╰═╯No need to blind me.
▁║▁ ║ ▂◣ There's this darkness where I walk.
▃▄▅▆▇╰═╯╰═╯▇▆▅▆▇████▆▇▅◣ˍ ~Playing My Game~
--
◢◣ ︵︵ █▔◣ █▔█ █▔▔ █▔█ █▆▉ █ █▔█ █◣█ █▔●
◢◤█◣◢◣ ︵︵ █ █ █▁◤ █▁▁ █▁█ ▉▉▉ █ █▁█ █◥█ █ █
夢之大地 逼逼ㄟ四 █▁◤ █ █ █▁▁ █ █ ▉▉▉ █▁ █ █ █ █ █▁◤
※ Origin: <bbs.ccns.ncku.edu.tw> ◆ From: 210.240.182.67
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
Programming 近期熱門文章
PTT數位生活區 即時熱門文章