Visual Basic.NET
  Home arrow Visual Basic.NET arrow Practical Examples of Namespaces in VB.NET...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Practical Examples of Namespaces in VB.NET 2005
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 34
    2006-09-18

    Table of Contents:
  • Practical Examples of Namespaces in VB.NET 2005
  • Inheriting a class from another namespace: continued
  • Inheriting a class from a root namespace (or assembly)
  • Inheriting a class from a root namespace (or assembly) in practice
  • Inheriting a class from a root namespace (or assembly): example
  • Inheriting a class from root namespace (or assembly): example continued

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Practical Examples of Namespaces in VB.NET 2005


    (Page 1 of 6 )

    This is the third article in a series focusing on inheritance in VB.NET 2005. In this article, I shall extend my previous article on namespaces to support it with a few more small and intelligent goodies.
    A downloadable file for this article is available here.

    If you are new to inheritance in Visual Basic.NET, I request that you go through my first article in this series titled "Inheritance with VB.NET 2005." If you are very new to OOP in VB.NET, I request you go through my first article in the series "Object Oriented Database Development using VB.NET."

    The entire source code for this article is available in the form of a downloadable zip. The solution was developed using Microsoft Visual Studio 2005 Professional Edition on Microsoft Windows Server 2003 Enterprise Edition. I didn't really test the solution with any other/previous editions. If you have any problems in executing the solution, please post in the discussion area.

    Inheriting a class from another namespace

    In my previous article, we examined the concept of namespaces in detail. Now, we shall develop classes by inheriting from other classes existing in other namespaces.

    Let us examine the following namespace first:

    NamespaceNamespace1
        Public Class First
            Private m_a As Integer
            Private m_b As Integer
            Public Sub New(ByVal x As Integer, ByVal y As Integer)
                m_a = x
                m_b = y
            End Sub
            Public Property A() As Integer
                Get
                    Return m_a
                End Get
                Set(ByVal value As Integer)
                    m_a = value
                End Set
            End Property
            Public Property B() As Integer
                Get
                    Return m_b
                End Get
                Set(ByVal value As Integer)
                    m_b = value
                End Set
            End Property
        End Class
    EndNamespace

    From the above, you can understand that I defined a class "First" in the namespace "Namespace1."  Now, I would like to define another class, "Second," which must inherit the class "First" available in "Namespace1."

    The next section shows you how to achieve this.

    More Visual Basic.NET Articles
    More By Jagadish Chaterjee


       · Hello guys! I am extending the series on OOPS with Visual Basic 2005 with this...
     

    VISUAL BASIC.NET ARTICLES

    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT