Does specifying the OutAttribute on ByRef internal methods currently do anything?

后端 未结 2 1457
情歌与酒
情歌与酒 2021-01-11 23:02

VB.NET doesn\'t have out parameters, but you can specify ByRef on COM and P/Invoke methods to get the same effect for external method

2条回答
  •  走了就别回头了
    2021-01-11 23:36

    I subclassed MembershipProvider with a VB class, we'll call it A, and then subclassed A with a C# class we'll call B. The C# code, B, was not recognizing the fact that the abstract methods in the MembershipProvider had already been implemented in the VB subclass, A, until I applied the OutAttribute in the VB class for parameters that were specified as out in the MembershipProvider base class abstract methods. This has an impact beyond just COM or P/Invoke.

提交回复
热议问题