A
Arpan
What's the difference between "Imports" & "Inherits"? For e.g. both the
codes below work without any errors:
Imports System
Imports System.Data
Imports System.Web.UI
Namespace Constructors
Public Class Constr : Inherits Page
Public Sub New()
Response.Write("Constructor1")
End Sub
End Class
End Namespace
----------
Imports System
Imports System.Data
Namespace Constructors
Public Class Constr : Inherits System.Web.UI.Page
Public Sub New()
Response.Write("Constructor1")
End Sub
End Class
End Namespace
In the first code snippet, I am importing "System.Web.UI" & then
inheriting the "Page" class where as in the second code snippet, I am
just inheriting "System.Web.UI.Page". So what's the difference between
importing & inheriting?
Thanks,
Arpan
codes below work without any errors:
Imports System
Imports System.Data
Imports System.Web.UI
Namespace Constructors
Public Class Constr : Inherits Page
Public Sub New()
Response.Write("Constructor1")
End Sub
End Class
End Namespace
----------
Imports System
Imports System.Data
Namespace Constructors
Public Class Constr : Inherits System.Web.UI.Page
Public Sub New()
Response.Write("Constructor1")
End Sub
End Class
End Namespace
In the first code snippet, I am importing "System.Web.UI" & then
inheriting the "Page" class where as in the second code snippet, I am
just inheriting "System.Web.UI.Page". So what's the difference between
importing & inheriting?
Thanks,
Arpan