two simple questions

  • Thread starter Thread starter Newbie \(C#,Asp.net\)
  • Start date Start date
N

Newbie \(C#,Asp.net\)

Hi
I have got three questions ,sorry if they are a little long:

1) Dose it really matter if I have using statements at the begining of my
codes that I don't use its classes ? dose it really hug memory in runtime??

2) I know what is a namespace and what is it used for ,but I strill don't
know what is the best way of naming your project and solutions in it and
what's the role of namespace when we have multiple solutions in one project
 
Newbie (C# said:
Hi
I have got three questions ,sorry if they are a little long:

1) Dose it really matter if I have using statements at the begining of my
codes that I don't use its classes ? dose it really hug memory in
runtime??

The using statements are there to allow you to type less. When the C#
compiler emits the IL it always fully qualifies type names. Therefore, if
you don't use a type from the namespace the C# compiler will not include
that namespace in teh assembly. More importantly, it will optimize any
assembly references that you don;t use out of the dependency list for the
assembly.
2) I know what is a namespace and what is it used for ,but I strill don't
know what is the best way of naming your project and solutions in it and
what's the role of namespace when we have multiple solutions in one
project

Umm, projects are in solutions not the other way around. But aside from
that, the solution name is irrelevant as far as the built code is
concerned - they simply act as a bag to carry around related projects. Pick
a convention and stick to it.

Projects names on the other hand act as the default for the name of the
assembly. Name them as you want your assembly named. For non-system
assemblies MSFT tend to use <company>.<technology>.<area> for their assembly
names. If this is what MSFT is doing it becomes what people expect when they
use components. Therefore its probably a good idea to follow the naming
convention that MSFT use.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
 
Back
Top