Jump to content

Form inheritance

- - - - -

  • Please log in to reply
2 replies to this topic

#1
Tonchi

Tonchi

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 471 posts
  • Location:Varaždin
  • Programming Language:C, C++, C#
how can i do that??? what's the syntax and what's with the access modifiers in inheritance

#2
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
When you create a new Windows Form application, you get this automatically generated code:

public partial class Form1 : Form // <--- That is inheritance taking place right there

{


}


The Form1 class inherits all the properties and methods of the Form superclass, thereby making Form1 a decedent of Form.

Here is a link to the MSDN page on the Form class:
Form Class (System.Windows.Forms)
It will tell you about all the properties and methods, and which access modifier each one has. (Too many to list here.)

Also, here's a link to the page that explains the various access modifiers:
Access Modifiers (C# Programming Guide)
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#3
Tonchi

Tonchi

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 471 posts
  • Location:Varaždin
  • Programming Language:C, C++, C#
tnx man it's helping ;)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users