473,779 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is it possible in csharp ?

Hello,
Is it possible to disable overridding of a class ?
Mark Ryden

Nov 6 '06 #1
4 1323
mark the class (or virtual member) as sealed

Marc
Nov 6 '06 #2
<ra******@gmail .comwrote in message
news:11******** **************@ k70g2000cwa.goo glegroups.com.. .
Is it possible to disable overridding of a class ?
http://www.codeproject.com/csharp/jmabstractclasses.asp
Nov 6 '06 #3
Mark Rae <ma**@markNOSPA Mrae.comwrote:
<ra******@gmail .comwrote in message
news:11******** **************@ k70g2000cwa.goo glegroups.com.. .
Is it possible to disable overridding of a class ?

http://www.codeproject.com/csharp/jmabstractclasses.asp
That shows how to make sure that a class *must* be derived from in
order to create an instance of it. A sealed class is in some ways the
opposite of an abstract class :)

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 6 '06 #4
"Jon Skeet [C# MVP]" <sk***@pobox.co mwrote in message
news:MP******** *************** *@msnews.micros oft.com...
Mark Rae <ma**@markNOSPA Mrae.comwrote:
><ra******@gmai l.comwrote in message
news:11******* *************** @k70g2000cwa.go oglegroups.com. ..
Is it possible to disable overridding of a class ?

http://www.codeproject.com/csharp/jmabstractclasses.asp

That shows how to make sure that a class *must* be derived from in
order to create an instance of it. A sealed class is in some ways the
opposite of an abstract class :)
Sigh - apologies again - I'm really having quite a day of it today...
Nov 6 '06 #5

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

Similar topics

5
2302
by: Mr. x | last post by:
Hello, where can I find csharp tutorial/help/samples. *.chm file is preffered. Thanks :)
8
10106
by: Nicolas | last post by:
How do I do a RaiseEvent in csharp I'm ok in VB but csharp confused me a lot. ******* code ******** private FileSystemWatcher watcher = new FileSystemWatcher(); public delegate void Changed(WatcherChangeTypes exch); public delegate void Created(string fileName); public delegate void ReCreated(string OldName, string newName); public delegate void OverRun(string Message);
4
2655
by: light_wt | last post by:
Hi I am taking the 2555 class and a lot of the material is over my head. I don't like the MS's book because there is no step-by-step on interacting with the VS.NET Is there good free resource in the web? If not, I have pulled a few books in the following. I am wondering which book has the concise step-by-step with lots of pictures helping to navigate on how to do something simple, i.e. concept of tabbed dialog box, web form, asp.net,...
2
2968
by: anand | last post by:
Hi All, Are ownerdraw buttons supported in C# ? I have an active X control which I would like to use in CSharp. Buttons have a style BS_OWNERDRAW, and to do custom drawing you have to handle WM_DRAWITEM message. It works greate in all languages except CSharp and VB.net.
7
9968
by: Peter Smirnov | last post by:
Sorry for this newbie question but as far as I heard one need at least VisualStudio to develop CSharp applications. Is this correct? Are there otherwise some command line tools like javac.exe and java.exe in the java world? Does soemone know a good "CSharp guide for java programmers"? Peter
1
1354
by: Preston | last post by:
hello all... My friend using vb.net made a DLL file which contains a Property Kkk(ByVal key As Object) in it, I use CSharp and reference this DLL file, but in csharp object browser, there is no Kkk property, cause csharp doesn't support parameterized scalar properties?? Then how can I use the Kkk property?? (I only know that if Csharp use Indexer, VB.net use Item as the property name.)
2
4553
by: news.microsoft.com | last post by:
Hi: I work in Csharp's parser files by LEX/YACC.Now I have only CSharp-lex.l and CSharp.y file,but they not have CSharp'comment Parse. this is a part of CSharp-lex.l. ..................... /***** Comments *****/ "/*" { yy_push_state(IN_COMMENT); } <IN_COMMENT>. { ; /* ignore */ } <IN_COMMENT>\n { ; /* ignore */ }
1
1047
by: TOMERDR | last post by:
Hi, I wonder if it is possible under .net to hook into the process of creating components for example System A create an Object O on System B I would like to be able to return a proxy to Object O Which namespace or technologies support it if at all? Thanks in advance.
2
2984
by: Karl | last post by:
Hi all, I'm reasonably new to csharp so you have to forgive me asking what may be a stupid question... As I said, I'm new to CSharp but in VB I was able to click anywhere on a DataGridView (so long as it was on a cell or header) and return the value contained in the first column for the selected row and store that as a variable or in a textbox.
1
241
by: markryde | last post by:
Hello, Is it possible in csharp to disable overridding of a class ? Regads, MR
0
9471
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10302
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9925
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8958
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5501
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4036
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 we have to send another system
2
3631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2867
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.