newbie to .net

G

Guest

1)what is the default namespace

2?)what is the difference between a property and field

3) what is the difference betwen creating an object on stack and heap in .net

4) what is the diferecne betweeen close and dispose methods
 
M

Michael S

I'll try to answer your rather broad questions as best as I can...
1)what is the default namespace?

Are you fetching for something like c++ Std namespace? Well, there are no
such thing in .NET.
2?)what is the difference between a property and field?

A property is a field-accessor, i.e. they let you specify getters and
setters for the property. Also, when creating custom components, they can be
used in the property editor in design mode.
3) what is the difference betwen creating an object on stack and heap in
..net?

Hehe, well the first creates an object allocated on the stack and the other
on the heap. Sorry, couldn't resist. =) Actually, this is a huge and
important topic. You should read more about it on your own. A good
introduction is to look at classes and structs and understand
boxing/unboxing.
4) what is the diferecne betweeen close and dispose methods?

Hmm, read about the IDispose interface and the dispose-pattern and you get
the hang on it.

happy coding
- Michael S
 
C

Colin Jack

Hi,

I'm not sure that this is what your looking for but if you select a project
in "Solution Explorer" in Visual Studio .NET and select "Properties" then
the default namespace for files that you add to the project is in "Common
Properties\General". And if you dont specify a namespace for an item then
it ends up in the global namespace.

I have a feeling that isnt what your looking for and that Michaels post will
be more use to you but you never know... :)

Ta,

Colin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top