ASP.NET.in.a.Nutshell.Second.Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

ASP.NET.in.a.Nutshell.Second.Edition [Electronic resources] - نسخه متنی

G. andrew Duthie; matthew Macdonald

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید










22.2 Classes


C# uses the
class statement along with opening and closing
braces to indicate the beginning and end of a class definition. For
example:

public class Form : ContainerControl {
// member definitions
}

In VB, a class definition is indicated by the Class... End
Class
construct:

Public Class Form 
' member definitions
End Class

In addition, C# classes can be marked as
abstract or sealed; these
correspond to the VB MustInherit and
NonInheritable keywords, as shown in Table 22-2.

Table 22-2. C# and equivalent VB class modifiers

C# keyword


VB keyword


abstract


MustInherit


sealed


NonInheritable

C# uses the colon to indicate either inheritance or interface
implementation. Both the base class and the implemented interfaces
are part of the class statement. For example:

public class Control : Component, ISynchronizeInvoke, IWin32Window

In VB, a base class and any implemented interfaces are specified on
separate lines immediately following the Class
statement. A class's base class is indicated by
preceding its name with the Inherits keyword; any
implemented interfaces are indicated by the
Implements keyword. Hence, the previous definition
of the Control class in C# would appear as follows
in VB:

Public Class Control
Inherits Component
Implements ISynchronizeInvoke, IWin32Window


/ 873