question about kind of class

Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Oct 2008
Posts: 63
Reputation: polo_coins is an unknown quantity at this point 
Solved Threads: 0
polo_coins polo_coins is offline Offline
Junior Poster in Training

question about kind of class

 
0
  #1
Oct 20th, 2008
I asked in my studies build a "sealed " class and I don't really understand it's differents from regular class and what different in syntax it has

Thanks Sergey
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,244
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 541
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is online now Online
Moderator

Re: question about kind of class

 
0
  #2
Oct 20th, 2008
a sealed class is a class that uses encapsulation. All its fields (properties) are private, as are all its methods.

It cannot be used or modified from any other class.
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: question about kind of class

 
0
  #3
Oct 20th, 2008
if you think of a normal class, you have say a form, you can add to it. You can make it your own, you can extend it..

A sealed class you cant, its as it is, it cannot be tampered with. To make it sealed, you simply add the word sealed as a moderator at the front.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 63
Reputation: polo_coins is an unknown quantity at this point 
Solved Threads: 0
polo_coins polo_coins is offline Offline
Junior Poster in Training

Re: question about kind of class

 
0
  #4
Oct 20th, 2008
Thanks to all,
Yes I tried now to build one that reached from
two others and in Main() I get that it doesn't know about any method in it so I can use it
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,978
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 288
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: question about kind of class

 
0
  #5
Oct 20th, 2008
that reached from
two others
What do you mean by that?
C# doesn't support multiple inheritance like C++.
And I really don't understand your problem with "sealed".
Sealed is as it says : "sealed". Even me, as a non native english speaker can understand the word.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 63
Reputation: polo_coins is an unknown quantity at this point 
Solved Threads: 0
polo_coins polo_coins is offline Offline
Junior Poster in Training

Re: question about kind of class

 
0
  #6
Oct 20th, 2008
No I know that C# work not like C++,
My class reach from one and his Parent byself child from another one,
II don't know why I can't see methods of my sealed class if methods are public ?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: question about kind of class

 
0
  #7
Oct 20th, 2008
Perhaps you need to do some reading and research
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 63
Reputation: polo_coins is an unknown quantity at this point 
Solved Threads: 0
polo_coins polo_coins is offline Offline
Junior Poster in Training

Re: question about kind of class

 
0
  #8
Oct 20th, 2008
yes i mde so and now it brought to me other
question and useful instruments
I discover that class can be abstract and
override
override I understood that one method use Parents same method but "abstract" is still a question for me
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: question about kind of class

 
0
  #9
Oct 20th, 2008
then you need to read more
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 63
Reputation: polo_coins is an unknown quantity at this point 
Solved Threads: 0
polo_coins polo_coins is offline Offline
Junior Poster in Training

Re: question about kind of class

 
0
  #10
Oct 20th, 2008
"ithen you need to read more"

it's what I already done and after that I ask for help here
if I not mistaken it's purpose of this forum
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC