473,465 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

inherited classes

Wich statement should i use for my classes can not be inherited ? selead
class name_class {} ???

--
Daniel Groh
CTF Technologies do Brasil LTDA
Analista Programador
Fone: 11 3837-4203
E-mail: dg***@ctf.com.br
Nov 17 '05 #1
4 1002
To make your class such that it cannot be dervied from use the "sealed" keyword

public sealed class MyNonDerivableClass
{
}

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Wich statement should i use for my classes can not be inherited ? selead
class name_class {} ???

Nov 17 '05 #2
Daniel Groh wrote:
Wich statement should i use for my classes can not be inherited ? selead
class name_class {} ???

Except you misspelled "sealed"
Nov 17 '05 #3
thanks richard!

--
Daniel Groh
CTF Technologies do Brasil LTDA
Analista Programador
Fone: 11 3837-4203
E-mail: dg***@ctf.com.br
"Richard Blewett [DevelopMentor]" <ri******@NOSPAMdevelop.com> escreveu na
mensagem news:OA*************@tk2msftngp13.phx.gbl...
To make your class such that it cannot be dervied from use the "sealed"
keyword

public sealed class MyNonDerivableClass
{
}

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Wich statement should i use for my classes can not be inherited ? selead
class name_class {} ???

Nov 17 '05 #4
yeah, i typed wrong, thank u too ;)

--
Daniel Groh
CTF Technologies do Brasil LTDA
Analista Programador
Fone: 11 3837-4203
E-mail: dg***@ctf.com.br
"Jianwei Sun" <js***********@gmail.com> escreveu na mensagem
news:u6**************@TK2MSFTNGP09.phx.gbl...
Daniel Groh wrote:
Wich statement should i use for my classes can not be inherited ? selead
class name_class {} ???

Except you misspelled "sealed"

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alexander Muylaert | last post by:
Hi Is their a way to keep constructors visible in inherited classes? public class X{ public x(int A){} } public class Y : X{};
8
by: TS | last post by:
I am trying to get set a property of a control on the inherited class from base class. I imagine i have to use reflection, so could someone give me the code to do it? something like this?...
4
by: Dan | last post by:
I have a need to make a set of classes that all share the same public methods, some implementation and some data. So, I made an abstract base (BaseClass) with an interface (IBaseClass) and a...
9
by: Reuben | last post by:
I have a field in an abstract class marked readonly. However, when I attempt to modify that field in the constructor of a class which inherits it, I get a compile-time error stating that 'A...
6
by: Peter Oliphant | last post by:
I just discovered that the ImageList class can't be inherited. Why? What could go wrong? I can invision a case where someone would like to add, say, an ID field to an ImageList, possible so that...
3
by: Wayne Brantley | last post by:
VS2005 RTM Create a web user control to use as a base class for other web user controls. Now, create a new web user control, change the class it inherits from to your base class and compile....
3
by: Matt F. | last post by:
I have an abstract class that about a dozen sub-classes inherit from. I want to enforce that each sub-class shadows an event in the abstract class, but can't quite figure out how to do this. ...
14
by: lovecreatesbea... | last post by:
Could you tell me how many class members the C++ language synthesizes for a class type? Which members in a class aren't derived from parent classes? I have read the book The C++ Programming...
12
by: Janaka Perera | last post by:
Hi All, We have done a object oriented design for a system which will create a class multiply inherited by around 1000 small and medium sized classes. I would be greatful if you can help me...
19
by: jan.loucka | last post by:
Hi, We're building a mapping application and inside we're using open source dll called MapServer. This dll uses object model that has quite a few classes. In our app we however need to little bit...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.