开发者

What does this class definition mean in C#?

I saw a class defined like this:

p开发者_如何学Cublic class TheAppointments : JavaScriptConverter
{

What does this mean? I'm kinda new to C#.

Thanks.


You are inheriting from the JavaScriptConverter class.

http://www.csharp-station.com/Tutorials/lesson08.aspx


The : notation is used to signify that the class TheAppointments inherits from the class JavaScriptConverter. Check out Wikipedia's explanation for some background info about inheritance in object oriented programming.


That means the class TheAppointments inherits from JavaScriptConverter


The overall meaning is you are defining a new class that is defined (a.k.a a subclass of) JavaScriptConverter.

The public part means that the class is visible to everything, in that anything can reference that class and create it if it has a public constrcutor.

The class part, well means it is a class. Other syntax that goes here could include interface and enum.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜