473,407 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

How to mark sealed?

How do you mark a class as sealed in VB.NET? Thanks!
Aug 16 '07 #1
3 13188
Use the NotInheritable keyword:

Public NotInheritable Class Person

End Class

J

"Smokey Grindel" <no****@nospam.comwrote in message
news:eJ**************@TK2MSFTNGP03.phx.gbl...
How do you mark a class as sealed in VB.NET? Thanks!


Aug 16 '07 #2
thanks!

"John" <jo**@donotspam.invalidwrote in message
news:ep**************@TK2MSFTNGP03.phx.gbl...
Use the NotInheritable keyword:

Public NotInheritable Class Person

End Class

J

"Smokey Grindel" <no****@nospam.comwrote in message
news:eJ**************@TK2MSFTNGP03.phx.gbl...
>How do you mark a class as sealed in VB.NET? Thanks!



Aug 16 '07 #3
You need to declare the class as NotInheritable.

Kev

"Smokey Grindel" wrote:
How do you mark a class as sealed in VB.NET? Thanks!
Aug 17 '07 #4

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

Similar topics

6
by: Julie | last post by:
What would be the primary motivation to make a class 'sealed' (meaning that you can't derive from it) in C++? (I understand that there is currently no sealed keyword in C++, but that there are...
5
by: Bharat Karia | last post by:
Hi, Is it possible to writed Sealed classes in C++ . i.e. there is no sealed/final keyword in C++, but is it possible to achieve the same effect? i.e. deriving from a sealed class is an error...
14
by: Zeng | last post by:
Would somebody know when we should seal a class? Shouldn't all classes be open up for inheritance? Thanks!
3
by: cmrchs | last post by:
Hi, why is the String class sealed ? wouldn't it be nice to have a class MyString : String { ... } containing already all the nice features of String ?
9
by: Kylin | last post by:
any better reason ? -- FireCrow Studio Kylin Garden EMail:gaotianpu@gmail.com ICQ:156134382
10
by: TJM | last post by:
Hi, Is it possible to have a method sealed and abstract at the same time? MSDN states clearly that this is not allowed for classes but it does not mention it for methods. I tried with a simple...
18
by: Vedo | last post by:
ref struct XXX abstract sealed { literal int A = 5; }; The definition above gives me the compiler warning "C4693: a sealed abstract class cannot have any instance members 'A'". The equivalent...
7
by: Zytan | last post by:
I know you cannot have a sealed static class, but why not? Why must static classes be left open to inheritance? This article: http://msdn.microsoft.com/msdnmag/issues/03/07/NET/ recommends to...
1
by: muler | last post by:
"If an instance method declaration includes the sealed modifier, it must also include the override modifier." The C# Programming Language, § 10.5.5 Sealed Methods Why is this? Thanks,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.