|
Isn't everything an object in C#?
John
|
|
|
|
|
|
I know all data types, predefined and user-defined, inherit from the System.Object class. I guess what is missing is values.
John
|
|
|
|
|
What in C# is not an object? Even an Integer is derrived from the Object-Class.
Thomas Krause
|
|
|
|
|
In my opinion Yes, everything is an object. I posted a similar question[^] not long ago in the C# forum and the only person who responded (David Stone) said that value types are not objects.
I disagree. I think an object is just a instance of a type that has properties and/or methods. How it's allocated is not really relevant. In C++ an instance of a class can be allocated on the stack, just like a value type in C#, yet it's still considered an object.
Also, the fact that everything derives from System.Object is yet another indication that everything is an object.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Alvaro Mendez wrote:
Also, the fact that everything derives from System.Object is yet another indication that everything is an object
Pointers are .NET types and they do not derive from System.Object. See this article[^] for details:
We were led to believe in C# that everything is an object. However, this is not true. Pointers are indeed a recognized type in CLR; but, they are neither a descendant of Object nor of ValueType - they are a root of their own, with no member functions, not ToString(), not even GetType().
|
|
|
|
|
Thanks for the link.
OK, so pointers are the exception to the rule. But then again, unmanaged code is also the exception in .NET.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Alvaro Mendez wrote:
OK, so pointers are the exception to the rule. But then again, unmanaged code is also the exception in .NET.
C# pointers are used in managed code. C# can't generate unmanaged code.
You can do it on anything you choose - from .bat to .net - A customer
|
|
|
|
|
Wow, 10 years ago.
What development tools were you using for Windows 3.1 back then?
What sort of general protection fault errors were you scratching your head over?
|
|
|
|
|
Well, back in '93 I was just getting the hang of Basic on a Spectrum clone (with 48kB of RAM and a tape recorder) Back then I didn't even know PC's existed!
Florin Crisan
|
|
|
|
|
|
Maybe, maybe not...I believe it all depends on the field...
You have no use of a car if you need to fly...and using a plane is simply impractical when u just need a road
|
|
|
|
|
Yeah...C++ is that Language. And you can have one enigne so car & plane both can share the power.
|
|
|
|
|
This is like Deep Thought, from The Hitchhiker's Guide to the Galaxy Trilogy. Deep Thought (a computer) designed the greatest computer ever to be known: Earth.
|
|
|
|
|
|
evolutions, man, evolutions....
|
|
|
|
|
Statements like those are the doom of computer science ...
About the only thing in CS that still haven't evolved is language.
Why ?
Not because people haven't discovered anything new.
Because everyone just pick the most popular language like the natural thing to do.
So, I might correct previous statement to something along the lines : languages HAVE evolved, but people still prefer dinosaurs out of mental inertia.
People spend countless hours trying to find and learn the best platform, the best framework, the best library, the best algorithm, the best data structure BUT nada for the language, the very thing they will use to build and glue everything together.
All that being said, C++ is good at low level stuff and at to the metal optimizations. Nothing more. Really.
Some languages that really shine when put under an inquisitive light :
SmallTalk (There is a S# compiler available from SmallScript[^])
Python
And dare I say it, LISP !!
And no, as far as I'm concerned, NOT Perl !!!!
Sébastien
Intelligence shared is intelligence squared.
Homepage : http://www.slorion.webhop.org
|
|
|
|
|
Sébastien Lorion wrote:
All that being said, C++ is good at low level stuff and at to the metal optimizations. Nothing more. Really.
Really?[^]
|
|
|
|
|
|
There are so many reasons why a coporation might pick a particular language for an application that a list like that is useless in proving any sort of point other than the simple one of settling an argument as to which language product X was written in.
|
|
|
|
|
I bet you will learn a lot from this one, see for more!
|
|
|
|
|
Sure, it's a pretty good real-time kernel (and the book is excellent). Not very applicable to Windows development though!
Phil
|
|
|
|
|
I have seen that you have posted this link in the lounge as well..Stop spamming the board TW.
Regards, Agni.
|
|
|
|
|
Yes, that was me, in the "other" category. Come now, people. Doesn't anyone have the vision of reversing the tractor beam to a repulsor beam by simply poking at a wall-sized equipment plan for 30 seconds? I think the same thing can be done with software. String up a bunch of web services, interconnect them using a REAL visual studio, and *poof*, a brand spanking new custom application.
That's the future of high level programming, IMHO.
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
I agree. Scripting within a plugin framework is the way forward. At least I think it is. Currently I only use limited VB scripting at the moment but am hoping to move forward and work on a C# based system.
On the fly system changes. So when I'm on site and the customer says, "Can we make it so the user has to enter this first and then that rather than the way we originally asked for it." I can make the changes without a problem, without having to recompile and still making it straight forward to go back to the original when they change their mind back again. (Oh and still charge them twice )
My dream.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|