Click here to Skip to main content
15,902,787 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalword, save Pin
pnpfriend1-Feb-03 8:43
pnpfriend1-Feb-03 8:43 
GeneralRe: word, save Pin
Torsten Mauz3-Feb-03 6:43
Torsten Mauz3-Feb-03 6:43 
QuestionVB 6 SQL problem ??? Pin
mixahlos31-Jan-03 15:07
mixahlos31-Jan-03 15:07 
AnswerRe: VB 6 SQL problem ??? Pin
Ray Cassick31-Jan-03 18:42
Ray Cassick31-Jan-03 18:42 
GeneralInheritance question… Pin
Ray Cassick31-Jan-03 9:43
Ray Cassick31-Jan-03 9:43 
GeneralRe: Inheritance question… Pin
Richard Deeming3-Feb-03 3:23
mveRichard Deeming3-Feb-03 3:23 
GeneralRe: Inheritance question… Pin
Ray Cassick6-Feb-03 7:21
Ray Cassick6-Feb-03 7:21 
GeneralRe: Inheritance question… Pin
mikasa4-Feb-03 8:50
mikasa4-Feb-03 8:50 
Actually, a better way would be to provide a ReadOnly Property called "Type". You can have this Property return an Enum (if you know how many ClassTypes you will have) or just a String if you Like. You could then Override the Property in the Derived Classes so that they can Return what Type of Class they are as well.

I find that Enums are great! Especially if you are allowing other Developers to use your Classes (since they don't know what Types to expect, Enums help a lot!).

'Base Class
Public Class Animal
'Enum
Public Enum AnimalTypes
Animal
Dog
Cat
Bird
End Enum

Public Overridable ReadOnly Property Type() As String
Get
Return "Animal"
End Get
End Property

Public Overridable ReadOnly Property Type2() As AnimalTypes
Get
Return Animal
End Get
End Property
End Class

'Derived Class
Public Class Dog:Inherits Animal
Public Overrides ReadOnly Property Type() As String
Get
Return "Dog"
End Get
End Property

Public Overrides ReadOnly Property Type2() As AnimalTypes
Get
Return Dog
End Get
End Property
End Class

GeneralRe: Inheritance question… Pin
Ray Cassick4-Feb-03 9:37
Ray Cassick4-Feb-03 9:37 
Generalinteger Pin
pnpfriend31-Jan-03 3:57
pnpfriend31-Jan-03 3:57 
GeneralRe: integer Pin
Jason McBurney31-Jan-03 4:41
Jason McBurney31-Jan-03 4:41 
GeneralRe: integer Pin
pnpfriend31-Jan-03 9:29
pnpfriend31-Jan-03 9:29 
GeneralRe: integer Pin
xBlitzerx2-Feb-03 14:36
xBlitzerx2-Feb-03 14:36 
Generalquery on createobject Pin
shanksprasad31-Jan-03 2:03
shanksprasad31-Jan-03 2:03 
GeneralRe: query on createobject Pin
RichardGrimmer5-Feb-03 6:28
RichardGrimmer5-Feb-03 6:28 
GeneralRe: query on createobject Pin
manoj madahavan20-Feb-03 5:22
manoj madahavan20-Feb-03 5:22 
GeneralRe: query on createobject Pin
Paul Farry22-Feb-03 17:23
professionalPaul Farry22-Feb-03 17:23 
Generalproblem updating datagrid Pin
mcm31-Jan-03 1:32
mcm31-Jan-03 1:32 
GeneralRe: problem updating datagrid Pin
Don Benson2-Feb-03 17:00
Don Benson2-Feb-03 17:00 
GeneralRe: problem updating datagrid Pin
Anonymous3-Feb-03 1:20
Anonymous3-Feb-03 1:20 
GeneralRe: problem updating datagrid Pin
Don Benson3-Feb-03 17:03
Don Benson3-Feb-03 17:03 
GeneralCustom Designer... Pin
Julusian30-Jan-03 14:24
Julusian30-Jan-03 14:24 
GeneralPlanet Source Code Visual Basic 2002 CD Pin
shacks30-Jan-03 8:57
shacks30-Jan-03 8:57 
Generalmoving cursor to last (new) row in datagrid Pin
mcm30-Jan-03 6:23
mcm30-Jan-03 6:23 
Generalstructure Pin
pnpfriend30-Jan-03 5:18
pnpfriend30-Jan-03 5:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.