R
Robert Halstead
Hi everyone,
My and a professor at my college (OIT) had a discussion
on whether or not the C# primitive integer, we're talking
about the "int" not the "Integer32", is an object.
We all know that when you code:
int a;
you can perform: a.toString() on that int, but does this
mean that the primitive that we all grew up with is a
object and not some value type that it was in C/C++?
My answer was no that it's not an object and something in
the framework is allowing the toString() method to be
called on all primitives. My professor's answer was yes
it was an object because of the toString() method. After
a while both sides of the argument became muddled and
questions started to point more towards how the framework
is declaring an "int" or other primitives rather than
what makes something an object.
If it is an object, I would like to know why it was
changed from a value type and how.
If it's not, I would like to prove my case that it's not
an object.
Also, if there is anywhere that can point me towards the
answer, please email me and tell me. I'll also look on
the newsgroup over the week for answers.
I was hopeing that one of the framework experts
can "school" me and him on this issue
Robert Halstead
My and a professor at my college (OIT) had a discussion
on whether or not the C# primitive integer, we're talking
about the "int" not the "Integer32", is an object.
We all know that when you code:
int a;
you can perform: a.toString() on that int, but does this
mean that the primitive that we all grew up with is a
object and not some value type that it was in C/C++?
My answer was no that it's not an object and something in
the framework is allowing the toString() method to be
called on all primitives. My professor's answer was yes
it was an object because of the toString() method. After
a while both sides of the argument became muddled and
questions started to point more towards how the framework
is declaring an "int" or other primitives rather than
what makes something an object.
If it is an object, I would like to know why it was
changed from a value type and how.
If it's not, I would like to prove my case that it's not
an object.
Also, if there is anywhere that can point me towards the
answer, please email me and tell me. I'll also look on
the newsgroup over the week for answers.
I was hopeing that one of the framework experts
can "school" me and him on this issue
Robert Halstead