Developing Namespaces in VB.NET 2005 - Summary
(Page 6 of 6 )
Even though I presented the examples in a more understandable format, you are free to use any of the following methods.
NamespaceNamespace1
NamespaceNamespace2
Public Class Third
Inherits Second
.
.
.
End Class
EndNamespace
EndNamespace
In the above method, I specifically nested “namespace2” in “namespace1” just for the sake of a “nested look.” There is no problem with using the above method.
For that matter, I can also declare and define the whole namespace with all of its nested namespaces and classes as follows:
NamespaceNamespace1
Public Class First
.
.
.
End Class
Public Class Second
Inherits First
.
.
.
End Class
NamespaceNamespace2
Public Class Third
Inherits Second
.
.
.
End Class
EndNamespace
EndNamespace
The above is also valid, but rarely practiced, when we have hundreds of lines of code in each class. It all depends on you to choose.
In this article, I simply wanted to explain the topics of OOPS. The code samples given in this article are neither the best in performance nor the best in programming methodologies.
Any feedback, suggestions, bugs, errors, improvements etc., are highly appreciated at jag_chat@yahoo.com.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |