0
C# namespace class name conflicts
I recently ran into the following question in the c# challenge mode: "The class names declared in one namespace may conflict with the same class names declared in another namespace." The correct answer was False. I just wanted to ask now, if I misunderstood the question, or if my understanding of namespaces is flawed. I thought that two classes with the same name but in different namespaces are allowed und would therefore not cause any collision. Am I mistaken or is this question asking something else?
4 odpowiedzi
+ 4
You are not mistaken, and the answer to the question is also correct. Both of you seem to agree with each other.
+ 4
Regardless, "may" or "might", in the context of possibility, both indicate that the statement affirms possible name collision, which is false because no collision would happen, as you have stated.
I understand that "may" relates to "allow" in some other context, but even that is also false when placed in the context of the question.
+ 1
grid96 if you convert it to a question rather than a statement any misunderstanding should be cleared up:
"May the class names in one namespace conflict with the same class names declared in another namespace?"
while the usage of the word "may" is unusual, grammatically it is correct. and it signifies asking whether or not something is allowed to happen.
0
But doesn't "may" imply, that their names are allowed to be in conflict? Wouldn't "might" be the correct word in that case?