Solved

Which of the following elements can an interface NOT contain?

Posted on 2007-03-31
6
2,189 Views
Last Modified: 2008-01-09
Which of the following elements can an interface NOT contain?
Constants, Constructors, Static Members or all of them?
0
Comment
Question by:mabtahi
  • 3
  • 2
6 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 18831039
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
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 125 total points
ID: 18831174
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
 
LVL 15

Expert Comment

by:Thogek
ID: 18833480
Why does that sound like a test/homework question?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 86

Expert Comment

by:jkr
ID: 18938851
Err: Why did you choose a comment as an answer that does not even refer to the question?
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 18941457
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
 
LVL 86

Expert Comment

by:jkr
ID: 18949736
OK, don't know much about C#, so I misunderstood your comment, sorry. But in that case, we both are correct.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now