views:

46

answers:

3

Hi. In a large Application is there any way to distinguish user-defined classes with built-in classes without checking ?

A: 

Who is going to distinguish it? Developers? Classes?

If Developers - Naming conventions If Classes - you might wanna check the inheritance (parent)

Pradeep
you know, I mean writing some attribute or any other else....
odiseh
+1  A: 

You haven't specified which platform you're talking about, but in both Java and .NET, you're recommended to use the organisation name in the namespace, e.g. Microsoft.CSharp.* or com.google.base.*. That means if you know the full name of the class, it should be fairly obvious where it comes from... and an IDE will generally show you the full name of the class (including the namespace) if you hover over the brief name in code.

If this doesn't help, please clarify the question.

Jon Skeet
well, actually I mean having some notation, icon, attribute or any other else could be helpful. Naming conventions and having "namespace" is good but when developer write "using ....." in code behind page then he/she cuts off helpful namings apparently.
odiseh
Not if you hover over the name. Do you find this is actually a problem? I've never found it to be an issue - it's usually clear which classes are application-specific and which are built-in, just by their functionality. Does it particularly matter anyway?
Jon Skeet
I think so......
odiseh
What do you think so? What problems have you run into?
Jon Skeet
A: 

I agree with Joh Skeet, you simply need to hover over the name of the class toget where it came from.

But, -- IF you're using .NET, and need a way to do it programmatically -- you could use reflection to get the assembly where the said class is defined, and probably the assembly does have the Company meta-data property set.

Paulo Santos