954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Inheritance Array Problem

Hey,

following Problem:

I have two classes Measurement and its subclass DC_Measurement.

Measurement has a method called:

public virtual SetPoint[,] createSetPointArray()


DC_Measurement:

public override DCSetPoint[,] createSetPointArray()


DCSetPoint is also a subclass of SetPoint.

I read that this is possible. Now I use in my mainWindow following code which contains an error:

DCSetPoint[,] calArray = selectedMeasurement.createSetPointArray();


Error: Cannot implicitly convert type 'paMeasure.SetPoint[*,*]' to 'paMeasure.DCSetPoint[*,*]'. An explicit conversion exists (are you missing a cast?)

I don't know what to do.
Thanks for help.

Tortura
Newbie Poster
15 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

Problem solved...Sorry:)

Tortura
Newbie Poster
15 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: