What is the difference between the following declarations (in C++/CLI):
public interface class IC {};
public interface struct IS {};
Similar situations:
public enum class EC {};
public enum struct ES {};
?
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.
They are identical.
For details, see MSDN’s interface class reference, under Remarks:
I believe Microsoft decided to allow both options just to keep consistency with
ref class/ref structandvalue class/value struct. However, since interfaces don’t have private members, for interface, the two statements become exactly the same.