Same name class in C#
Can be create two class of same name in a assembly, if yes, then how can it do.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jul 5, 2012, 5:10 AM
The C# compiler combines the members of the two partial classes which are therefore treated just the same as if they had been declared as a single class:
Mahesh ChandPosted Jul 5, 2012, 1:43 AM
Jignesh TrivediPosted Jul 4, 2012, 11:24 PM
Same Class name with in a project is possible if and only if both are in different namespace or different assembly.
Actually Why you required same class name in assembly?
Yes Shen is right if you both classes are partial then it combine at compile time.
hope this will help.
Shen HengbinPosted Jul 4, 2012, 11:00 PM