C
Carlo Razzeto
Hey there, I'm a bit of a C# newbie and I have some questions regarding
syntax.
#1: Unsafe code blocks:
From what I understand (based on what I've read from the C# Essentials
O'Reilly book) memory managment in C# unsafe code blocks are handled almost
in good old C++ way (i.e. memory allocations don't go away unless you tell
them to). The one thing I didn't see mentioned in the book is what you use
to deallocate memory. So what do I call to deallocate memory, take the
following example for instace (C++ syntax used)
string *temp = new string[100];
What would be analogous to:
delete temp;
#2: Libraries.
I was thinking about building up a general usage library for web
programming. What I would love is to have, for instance one base namespace
that can be included and would give the programmer access to various classes
and methods. I already know how to create namespaces and classes with in
namespaces... What I would like to know is if there is a way to attach a
method to a name space, out side of a class. There are a few functions where
it would simply be more conviniant for me to not have them be attached to
any class.
Thanks for any help.
syntax.
#1: Unsafe code blocks:
From what I understand (based on what I've read from the C# Essentials
O'Reilly book) memory managment in C# unsafe code blocks are handled almost
in good old C++ way (i.e. memory allocations don't go away unless you tell
them to). The one thing I didn't see mentioned in the book is what you use
to deallocate memory. So what do I call to deallocate memory, take the
following example for instace (C++ syntax used)
string *temp = new string[100];
What would be analogous to:
delete temp;
#2: Libraries.
I was thinking about building up a general usage library for web
programming. What I would love is to have, for instance one base namespace
that can be included and would give the programmer access to various classes
and methods. I already know how to create namespaces and classes with in
namespaces... What I would like to know is if there is a way to attach a
method to a name space, out side of a class. There are a few functions where
it would simply be more conviniant for me to not have them be attached to
any class.
Thanks for any help.