Classes

G

Guest

I have a user class and a admin class that inherits the user class. The Admin
class has 1 more attribute, that is the AdminRole (String). This is how I
declare the constructor statement in the Admin class:

Public Sub New(ByVal newUserID As String, ByVal newPassword As String, ByVal
newActivate As String, ByVal newLastUpdate() As Byte, ByVal newAdminRole As
String)

MyBase.New(newUserID, newPassword, newActivate, newLastUpdate)
_AdminRole = newAdminRole

End Sub

Is it ok to declare like this?
 
C

Cor Ligthert

Wrytat,

I see nothing wrong, however this is so easy to try yourself.
When it does not what you want, than there is something wrong.
In this case I doubt that.

Cor
 
G

Guest

Thank you~ I don't really know how to test it actually. I build my class
library, copy the dll file to the bin folder of my web application folder.
Then import the namespace and I can start creating the objects?
 
C

Cor Ligthert

Wrytat,

This is as well in connection to your other message.

Keep in mind that when a page is sent, all not shared objects are destroyed.
Therefore a method is before you sent a page (what happens just because the
last instruction is done), that you save all your objects, which you needs
on PostBack, into session.items. In my opinion is that the best place for
that. A dataset is very easy to set in that (it is already serialized)..

Using shared objects has another behaviour than in a windowform application.
A shared object belongs to all the active sessions.

I hope this gives some ideas,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top