看板Programming
标 题[c#]回传型态为物件,回传值为null
发信站梦之大地 (Sun Dec 17 13:53:17 2006)
转信站ptt!ctu-reader!Spring!news.nctu!news2!ccnews.ncku!news.ccns.ncku!Dream
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