Is it good practice to use namespace like a variable???using CommonEntities = HEPL.Common.UIModel.Entities; OR
using HEPL.Common.UIModel.Entities; which one is good practice in above code?
Is it good practice to use namespace like a variable???using CommonEntities = HEPL.Common.UIModel.Entities; using HEPL.Common.UIModel.Entities; which one is good practice in above code?
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 28, 2014, 9:40 AM
using CommonEntities = HEPL.Common.UIModel.Entities;
is if that particular namespace contains a type (SomeClass say) whose name clashes with a type in another namespace you're importing or which you've written yourself.
Instead of having to write out HEPL.Common.UIModel.Entities.SomeClass you can then abbreviate it to CommonEntities.SomeClass to distinguish it from the other SomeClass in your project.
jitendra kumarPosted Jul 28, 2014, 8:02 AM
Pradeep ShetPosted Jul 28, 2014, 8:02 AM
Both are same things but according to me,