Click here to Skip to main content
15,898,939 members
Home / Discussions / C#
   

C#

 
AnswerLoop Pin
Ennis Ray Lynch, Jr.26-Jul-06 11:25
Ennis Ray Lynch, Jr.26-Jul-06 11:25 
GeneralRe: Loop Pin
clint198226-Jul-06 11:42
clint198226-Jul-06 11:42 
GeneralRe: Loop Pin
Ennis Ray Lynch, Jr.26-Jul-06 11:55
Ennis Ray Lynch, Jr.26-Jul-06 11:55 
GeneralRe: Loop Pin
clint198226-Jul-06 21:30
clint198226-Jul-06 21:30 
GeneralRe: Loop Pin
Ennis Ray Lynch, Jr.27-Jul-06 3:39
Ennis Ray Lynch, Jr.27-Jul-06 3:39 
GeneralHow about this??? Pin
Ennis Ray Lynch, Jr.27-Jul-06 4:26
Ennis Ray Lynch, Jr.27-Jul-06 4:26 
QuestionMulti-Threading a COM DLL in .NET Pin
P Sernz26-Jul-06 11:09
P Sernz26-Jul-06 11:09 
QuestionSmalltalk’s object-based hierarchy does not work so well".Also c#?? Pin
sawerr26-Jul-06 10:54
sawerr26-Jul-06 10:54 
I read a book , "Thinking in C++".At pg:694( Introduction to templates) he writes:
<br />
"The Smalltalk solution. Smalltalk (and Java, following its<br />
example) took a simple and straightforward approach: You want to<br />
reuse code, so use inheritance. To implement this, each container<br />
class holds items of the generic base class Object (similar to the<br />
example at the end of Chapter 15). But because the library in<br />
Smalltalk is of such fundamental importance, you don’t ever create<br />
a class from scratch. Instead, you must always inherit it from an<br />
existing class. You find a class as close as possible to the one you<br />
want, inherit from it, and make a few changes. Obviously, this is a<br />
benefit because it minimizes your effort (and explains why you<br />
spend a lot of time learning the class library before becoming an<br />
effective Smalltalk programmer).<br />
But it also means that all classes in Smalltalk end up being part of a<br />
single inheritance tree. You must inherit from a branch of this tree<br />
when creating a new class. Most of the tree is already there (it’s the<br />
Smalltalk class library), and at the root of the tree is a class called<br />
Object – the same class that each Smalltalk container holds.<br />
This is a neat trick because it means that every class in the<br />
Smalltalk (and Java1) class hierarchy is derived from Object, so<br />
every class can be held in every container (including that container<br />
itself). This type of single-tree hierarchy based on a fundamental<br />
generic type (often named Object, which is also the case in Java) is<br />
referred to as an "object-based hierarchy." You may have heard this<br />
term and assumed it was some new fundamental concept in OOP,<br />
like polymorphism. It simply refers to a class hierarchy with Object<br />
(or some similar name) at its root and container classes that hold<br />
Object.<br />
Because the Smalltalk class library had a much longer history and<br />
experience behind it than did C++, and because the original C++<br />
compilers had no container class libraries, it seemed like a good<br />
idea to duplicate the Smalltalk library in C++. This was done as an<br />
experiment with an early C++ implementation2, and because it<br />
1 With the exception, in Java, of the primitive data types. These were made non-<br />
Objects for efficiency.<br />
2 The OOPS library, by Keith Gorlen while he was at NIH.<br />
16: Introduction to Templates 695<br />
represented a significant body of code, many people began using it.<br />
In the process of trying to use the container classes, they discovered<br />
a problem.<br />
The problem was that in Smalltalk (and most other OOP languages<br />
that I know of), all classes are automatically derived from a single<br />
hierarchy, but this isn’t true in C++. You might have your nice<br />
object-based hierarchy with its container classes, but then you<br />
might buy a set of shape classes or aircraft classes from another<br />
vendor who didn’t use that hierarchy. (For one thing, using that<br />
hierarchy imposes overhead, which C programmers eschew.) How<br />
do you insert a separate class tree into the container class in your<br />
object-based hierarchy? Here’s what the problem looks like:"<br />
<br />
And a diagram<br />
and he writes:<br />
<br />
"Because C++ supports multiple independent hierarchies,<br />
Smalltalk’s object-based hierarchy does not work so well."<br />

Is this true?
I have 2 questions
1-)Can we say same thing for C#?(I mean: C#’s object-based hierarchy does not work so well).What is C# 's solution?
2-)We know C# is very very differnet than c++.Someone look and see that everyline of code is ended with ";" so says:"C# is similiar to c++".But this is not true.
Can we accept author's expression for "showing differences between C++'s OO fashion and C#'s OO fashion"

What are your opinions.
I am looking for your answers.
AnswerRe: Smalltalk’s object-based hierarchy does not work so well".Also c#?? Pin
LongRange.Shooter28-Jul-06 9:13
LongRange.Shooter28-Jul-06 9:13 
QuestionProblems with a forms designer Pin
Ymer26-Jul-06 10:45
Ymer26-Jul-06 10:45 
AnswerRe: Problems with a forms designer [modified] Pin
LongRange.Shooter28-Jul-06 9:20
LongRange.Shooter28-Jul-06 9:20 
Questionalternative to structs? Pin
honeyman_can26-Jul-06 10:12
honeyman_can26-Jul-06 10:12 
AnswerIf you are worried about performance Pin
Ennis Ray Lynch, Jr.26-Jul-06 10:45
Ennis Ray Lynch, Jr.26-Jul-06 10:45 
GeneralRe: If you are worried about performance Pin
honeyman_can27-Jul-06 7:59
honeyman_can27-Jul-06 7:59 
AnswerRe: alternative to structs? Pin
LongRange.Shooter28-Jul-06 9:33
LongRange.Shooter28-Jul-06 9:33 
QuestionHow to deploy project with SQL Server 2005 express? Pin
_awatts26-Jul-06 9:55
_awatts26-Jul-06 9:55 
Question.GetFiles(?) Pin
HahnTech26-Jul-06 9:25
HahnTech26-Jul-06 9:25 
AnswerRe: .GetFiles(?) Pin
Dustin Metzgar26-Jul-06 9:55
Dustin Metzgar26-Jul-06 9:55 
GeneralRe: .GetFiles(?) Pin
HahnTech26-Jul-06 12:17
HahnTech26-Jul-06 12:17 
QuestionEnterprise Library 2.0 and Database Trace Listener Pin
osamahmirza26-Jul-06 9:18
osamahmirza26-Jul-06 9:18 
QuestionCommunicating between forms Pin
jerrymei26-Jul-06 9:04
jerrymei26-Jul-06 9:04 
AnswerRe: Communicating between forms Pin
led mike26-Jul-06 9:11
led mike26-Jul-06 9:11 
Questiontrygetvalue? Please help Pin
honeyman_can26-Jul-06 8:46
honeyman_can26-Jul-06 8:46 
AnswerDo you have access to a computer? Pin
Ennis Ray Lynch, Jr.26-Jul-06 9:12
Ennis Ray Lynch, Jr.26-Jul-06 9:12 
AnswerRe: trygetvalue? Please help Pin
led mike26-Jul-06 9:15
led mike26-Jul-06 9:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.