Click here to Skip to main content
15,917,328 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: DAAB wrapper issues with MS Access Pin
shreekar3-Jan-07 21:19
shreekar3-Jan-07 21:19 
Questionhelp with PRINTING MARGINS (PAGESETTINGSDLG) Pin
vbbeg3-Jan-07 18:43
vbbeg3-Jan-07 18:43 
QuestionBuild Error Message Pin
mosdwt3-Jan-07 18:21
mosdwt3-Jan-07 18:21 
AnswerRe: Build Error Message Pin
CPallini3-Jan-07 21:55
mveCPallini3-Jan-07 21:55 
QuestionNotecard Program Pin
sh3l13-Jan-07 13:39
sh3l13-Jan-07 13:39 
AnswerRe: Notecard Program Pin
CPallini3-Jan-07 21:41
mveCPallini3-Jan-07 21:41 
QuestionRe: Notecard Program [modified] Pin
sh3l14-Jan-07 13:41
sh3l14-Jan-07 13:41 
QuestionPolymorphism/Inheritance question Pin
dukesys3-Jan-07 11:44
dukesys3-Jan-07 11:44 
Hello All,

I have a project I am currently working on using VB .NET and VS 2005. Basically one of my classes maintains a collection of various objects all derived from a base class, but different. I want each of these derived classes to have a common method, but the paramaters for the method will vary.

Example, here is a cut down version of the base class and derived classes and what I want them to do.

Class clsString
public mustoveride sub AddPoint(index as integer, pnt as clsPnt)
End class

Here are some versions of the derived classes.

Class clsString3D
inherits clsString
public overrides sub AddPoint(index as integer, pnt as cls3d)
'do some other stuff here
End class

Class clsString6D
inherits clsString
public overrides sub AddPoint(index as integer, pnt as cls6d)
'do some other stuff here
End class

My program returns the object in this manner
Public function getString(byref name as string) as clsstring
getstring=string.item(name)
end function

I then call the function like this
Dim STR as clsstring
dim P6 as new cls6D
p6.setvals(5,7,34.6,45,3)
str=MDL.getString("MC01") 'this would in a working version return a string of clString6D
Str.AddPoint(4, P6)

Now I realise that you cannot override the function if the function signature is not the same, but shadowing doesn't seem to work either. Could someone please explain to me correct way for me to code what I want to do, or even if it is possible.


Regards,

Martin Duke
AnswerRe: Polymorphism/Inheritance question Pin
CPallini3-Jan-07 21:38
mveCPallini3-Jan-07 21:38 
GeneralRe: Polymorphism/Inheritance question Pin
dukesys4-Jan-07 11:54
dukesys4-Jan-07 11:54 
Questionformat date in MySql Pin
jds12073-Jan-07 10:07
jds12073-Jan-07 10:07 
AnswerRe: format date in MySql Pin
Dave Kreskowiak3-Jan-07 11:40
mveDave Kreskowiak3-Jan-07 11:40 
GeneralRe: format date in MySql Pin
jds12074-Jan-07 3:59
jds12074-Jan-07 3:59 
GeneralRe: format date in MySql Pin
jds12074-Jan-07 5:27
jds12074-Jan-07 5:27 
QuestionPerformance with Editor Pin
Cecil Cheah3-Jan-07 10:00
Cecil Cheah3-Jan-07 10:00 
AnswerRe: Performance with Editor Pin
Enriad4-Jan-07 2:47
Enriad4-Jan-07 2:47 
QuestionVB6 to VB.NET printing using Printer Language Pin
oogyboogyme3-Jan-07 8:18
oogyboogyme3-Jan-07 8:18 
AnswerRe: VB6 to VB.NET printing using Printer Language Pin
MatrixCoder3-Jan-07 8:40
MatrixCoder3-Jan-07 8:40 
AnswerRe: VB6 to VB.NET printing using Printer Language Pin
oogyboogyme3-Jan-07 8:51
oogyboogyme3-Jan-07 8:51 
AnswerRe: VB6 to VB.NET printing using Printer Language Pin
Tim Carmichael3-Jan-07 10:17
Tim Carmichael3-Jan-07 10:17 
GeneralRe: VB6 to VB.NET printing using Printer Language Pin
oogyboogyme4-Jan-07 13:00
oogyboogyme4-Jan-07 13:00 
GeneralRe: VB6 to VB.NET printing using Printer Language Pin
Tim Carmichael5-Jan-07 2:41
Tim Carmichael5-Jan-07 2:41 
QuestionEngineering problem-please advise Pin
neobavesten3-Jan-07 6:10
neobavesten3-Jan-07 6:10 
GeneralRe: Engineering problem-please advise Pin
nagendra rao s.v.3-Jan-07 20:07
nagendra rao s.v.3-Jan-07 20:07 
QuestionMySql connection Pin
jds12073-Jan-07 5:59
jds12073-Jan-07 5:59 

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.