Here is what I am talking about.
VB.Net 2.0 Code:
ASP.NetCode:'inside of a class Public Class Class1 Protected Friend Sub TestMe() End Sub End Class 'inside of a windows form Public Class Form1 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim t As New Class1 t.TestMe() <----intellisense picks this up End Sub End Class
In ASP.Net, if I change it to Friend Sub, the compiler says it is private and of course, when it is Protected Friend Sub, the compiler says it is protected.Code:'class inside of App_Code Imports Microsoft.VisualBasic Public Class Data Protected Friend Sub TestMe() End Sub End Class 'inside a windows form Imports System.Data.SqlClient Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim m As New Data m.'<---------------Intelisense not picking it up End Sub End Class
I just want to get a handle on OOP.




Reply With Quote