Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 27th, 2004, 05:04 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default MustInherit

Hello,

I'm trying to learn C#, and I pick it up some, but am still learning. Does anybody know the C# equivalent to MustInherit when declaring a class, or is that a VB.NET specific syntax?

Thanks,

Brian
__________________
Brian
 
Old May 27th, 2004, 08:14 PM
Authorized User
 
Join Date: Feb 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

VB:
Public MustInherit Class A

C#:
public abstract class A

via the Instant C# vb.net to c# converter (www.instantcsharp.com).



 
Old May 28th, 2004, 11:30 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Ok, thanks. You wouldn't happen to know the keyword for notinheritable?

Thanks again.
 
Old May 29th, 2004, 03:45 PM
Authorized User
 
Join Date: Feb 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

"sealed"

e.g.,
VB code:
Public NotInheritable Class B : Inherits A

C# code:
public sealed class B : A


 
Old May 30th, 2004, 08:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Thanks very much. That's very helpful.









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.