Ienumerable x=new classA();
I know you can’t instantiate an interface. But would it be okay to call x an instance of Ienumerable? If not what is an easy way to address x while still conveying that its a variable of the type Ienumerable?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes – calling x an instance of Ienumerable is completely correct.
You could also say “x implements Ienumerable” or “x supports Ienumerable”