Which of the following elements can an interface NOT contain?

Which of the following elements can an interface NOT contain?
Constants, Constructors, Static Members or all of them?
mabtahiAsked:
Who is Participating?
 
gregoryyoungConnect With a Mentor Commented:
is this geared towards C# or C++?

The most interesting of these in C# is static methods which are actually supported bythe CLR but there is no language support for them. Beyond that possible exception allare not allowed.
0
 
jkrCommented:
None of the above is ruled out (from a perspective of valid and compilable C++ code), yet neither of them makes sense (except enum constants).
0
 
ThogekCommented:
Why does that sound like a test/homework question?
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
jkrCommented:
Err: Why did you choose a comment as an answer that does not even refer to the question?
0
 
gregoryyoungCommented:
umm jkr, I certainly did .. I answerred it for C# it being that this is in the C# TA.

None are allowed in C# but the CLR supports static methods on interfaces.
0
 
jkrCommented:
OK, don't know much about C#, so I misunderstood your comment, sorry. But in that case, we both are correct.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.