Some understanding questions...



Hi!

I am still a beginner with Java/VJ#.NET/ASP.NET, and now I have some understanding questions:

1. private, public and protected:
1.1. If I want to use my variables only inside of my class-file they must be private?
1.2. Is this correct: If I want to use variables or methods from outside the class-file thy must be public?
1.3. What means protected?


2. Sometimes I heard "If the page request is not a postback". What does this mean?

3. What means static?
3.1. I know that I could use staic variables only from staitc mehtods. But for what is "static"?


4. Exception handling with try/catch:
4.1. If I want to catch all Exceptions, I do this with "catch(Exception ex) {...}"?
4.2. Else I could specify the exact Exception "catch(OleDbException) {...}"?


Thanks for any help!!!

Greetings,
christian.


.



Relevant Pages

  • Re: Adding a record to a Microsoft Jet database
    ... Barbara Pickerd ... I'm a beginner. ... > Private m_cnADONetConnection As New OleDb.OleDbConnection ... > Private Sub btnAddNew_Click(ByVal sender As System.Object, ...
    (microsoft.public.dotnet.framework.adonet)
  • Adding a record to a Microsoft Jet database
    ... I’m a beginner. ... “An unhandled exception of type 'System.InvalidOperationException' ... Private m_cnADONetConnection As New OleDb.OleDbConnection ... Private Sub btnAddNew_Click(ByVal sender As System.Object, ...
    (microsoft.public.dotnet.framework.adonet)