Thanks, yea that’s what I’ve done except i was adding additional methods into each question which weren't part of the interface so they weren’t exposed when i added the questions to the list.
Thanks for the help learning slowly.
I have 2 types of questions both have similar properties, and reach use an interface to define the methods which are common to both. My array needs to contain various question type 1 and type 2 which forms the quiz. The program moves through the array of questions displaying each one based on...
What i mean is i am trying to store 2 different types of custom objects in 1 array. I have tried and array of type Object but run into problems when i then try to access methods of the individual objects as there type is not know.
I am trying to iterate over all controls in a panel components collection to retrieve value from nested TextBox components. the code below produces an error.
TextBox' is a 'type' but is used like a 'variable'. What is the best way to do this?
public void ListControlCollection()
{...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.