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.

Problem solved...Sorry:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.