Practice mode C#

Which statement about partial classes in C# is true?

Correct answer C. All parts must use the partial keyword and be in the same assembly and namespace

Explanation

A partial class splits one type's definition across several declarations, often in separate files, as with designer-generated code. Every part must carry the partial modifier and belong to the same assembly and namespace, and the compiler merges them into a single type. If parts name base classes, they must agree.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.