Custom Query (162 matches)
Results (31 - 33 of 162)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#147 | fixed | 派生クラスの例外を基底クラス型で受け取れない。 | ||
Description |
次のプログラムでCatch As Exceptionという出力がなされない。ステップ実行してもCatch内に入らない。 #console Imports System Try Throw New SystemException("SystemException") 'SystemExceptionはExceptionの派生クラス Catch e As Exception Print "Catch As Exception" End Try Sleep(-1) 次のプログラムでは、Catch As SystemExceptionが出力される。Catch節を上から順に見て、最初に見付かるSystemExceptionをCatch可能なCatch節として、Catch e As Exception以下へ制御が移るようにすべき。 #console Imports System Try Throw New SystemException("aa") Catch e As Exception Print "Catch As Exception" Catch e As SystemException Print "Catch As SystemException" End Try Sleep(-1) |
|||
#149 | fixed | デリゲートに非クラスメンバ関数を指定できない | ||
Description |
次のコードがコンパイルできません。 Delegate Sub Callback1() Sub P1() End Sub Class C Public Static Sub P1() End Sub End Class Dim c = New Callback1(AddressOf(P1)) 'C.P1なら可能なのに……。 |
|||
#151 | duplicate | デリゲートで利用者定義の参照型を引数・戻り値に使えない | ||
Description |
ユーザ定義のインタフェース・列挙・クラス型をデリゲートの引数や戻り値にするとコンパイルエラーになる。 Interface ITest End Interface Delegate Sub D1 (test As ITest) 下の例ではEnumをClassにしてもエラーになる。一方、Typeにした場合はエラーにならない。 Enum Test End Enum Delegate Function D1(value As Test) As Long |
Note:
See TracQuery
for help on using queries.