Click here to Skip to main content
16,006,440 members
Home / Discussions / C#
   

C#

 
GeneralRe: why are classes sealed? Pin
Nish Nishant24-Dec-02 11:23
sitebuilderNish Nishant24-Dec-02 11:23 
AnswerRe: why are classes sealed? Pin
leppie24-Dec-02 10:13
leppie24-Dec-02 10:13 
AnswerRe: why are classes sealed? Pin
Christian Graus24-Dec-02 11:05
protectorChristian Graus24-Dec-02 11:05 
GeneralRe: why are classes sealed? Pin
Nish Nishant24-Dec-02 11:23
sitebuilderNish Nishant24-Dec-02 11:23 
GeneralRe: why are classes sealed? Pin
Christian Graus24-Dec-02 12:42
protectorChristian Graus24-Dec-02 12:42 
GeneralRe: why are classes sealed? Pin
Marc Clifton24-Dec-02 14:09
mvaMarc Clifton24-Dec-02 14:09 
GeneralRe: why are classes sealed? Pin
Christian Graus24-Dec-02 14:18
protectorChristian Graus24-Dec-02 14:18 
AnswerRe: why are classes sealed? Pin
James T. Johnson24-Dec-02 15:30
James T. Johnson24-Dec-02 15:30 
Point is sealed because it is a struct, and structs don't allow inheritence.

String is sealed because if some things were to change with its behavior it would cause vast shockwaves to flow throughout the framework because the way it is used is based on its implementation. If you were to modify String so that strings could mutate then vast portions of the framework wouldn't work correctly because the framework assumes string can't mutate.

As someone else pointed out, allowing some classes to be derived from could cause problems security wise.

James

[edit]fixed typo[/edit]
[edit2]yeesh, I think I need some sleep, clarified point about string[/edit2]

"The elastic retreat rings the close of play as the last wave uncovers
the newfangled way.
But your new shoes are worn at the heels and
your suntan does rapidly peel and
your wise men don't know how it feels to be thick as a brick."
"Thick as a Brick" from Thick as a Brick, Jethro Tull 1972

GeneralRe: why are classes sealed? Pin
JasonSmith25-Dec-02 16:04
JasonSmith25-Dec-02 16:04 
GeneralRe: why are classes sealed? Pin
James T. Johnson26-Dec-02 10:35
James T. Johnson26-Dec-02 10:35 
AnswerRe: why are classes sealed? Pin
James T. Johnson26-Dec-02 10:40
James T. Johnson26-Dec-02 10:40 
GeneralRe: why are classes sealed? Pin
Marc Clifton26-Dec-02 10:41
mvaMarc Clifton26-Dec-02 10:41 
QuestionHow to call GetIPictureFromPicture(Image image) method using C#. Pin
sns24-Dec-02 2:26
sns24-Dec-02 2:26 
AnswerRe: How to call GetIPictureFromPicture(Image image) method using C#. Pin
sns25-Dec-02 20:25
sns25-Dec-02 20:25 
Generalpoor but trying Pin
GaryR24-Dec-02 1:24
GaryR24-Dec-02 1:24 
GeneralRe: poor but trying Pin
TigerNinja_24-Dec-02 2:56
TigerNinja_24-Dec-02 2:56 
GeneralRe: poor but trying Pin
GaryR24-Dec-02 13:31
GaryR24-Dec-02 13:31 
GeneralPrinting Crystal reports Pin
sharon23-Dec-02 21:35
sharon23-Dec-02 21:35 
GeneralRe: Printing Crystal reports Pin
sharon25-Dec-02 21:42
sharon25-Dec-02 21:42 
General[URGENT PLEASE] Audio Library Pin
Jassim Rahma23-Dec-02 21:11
Jassim Rahma23-Dec-02 21:11 
GeneralRe: [URGENT PLEASE] Audio Library Pin
James T. Johnson23-Dec-02 21:28
James T. Johnson23-Dec-02 21:28 
GeneralRTL PrintDocument Pin
Jassim Rahma23-Dec-02 9:59
Jassim Rahma23-Dec-02 9:59 
GeneralRichEditBox Pin
Dave Kerr23-Dec-02 3:50
Dave Kerr23-Dec-02 3:50 
GeneralRe: RichEditBox Pin
leppie23-Dec-02 12:12
leppie23-Dec-02 12:12 
GeneralRe: RichEditBox Pin
Dave Kerr23-Dec-02 13:07
Dave Kerr23-Dec-02 13:07 

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.