使用する利点は、Partial
NotInheritable
Class
共有メソッドを宣言/実装できることです。
これは、問題を視覚化するのに役立つコードサンプルです。
Namespace MyNamespace.Utility
' Cannot Declare Shared Function
Public NotInheritable Class Document
' Can Declare Shared Function
End Class
End Namespace
これは反対です
Namespace MyNamespace
Partial Public NotInheritable Class Utility
' Can Declare Shared Function
Partial Public NotInheritable Class Document
' Can Declare Shared Function
End Class
End Class
End Namespace