Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はC#の世界では初めてです。C ++で記述されたCOMサーバーがあり、状況によっては、variant_t :: missing()が返されます。C#でその値を受け取ろうとすると:
object a; a = comServer.Value // Value returns missing
C#でイベントハンドルを実行できないという例外がスローされます。
どうすればいいですか?
試して/キャッチでそれを包みます:
try { object a = comServer.Value; } catch (Exception ex) { // handle the error }