Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Form inheritance

inheritance

  • Please log in to reply
2 replies to this topic

#1 Tonchi

Tonchi

    Helping the world with programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1249 posts
  • Location:Zagreb
  • Programming Language:C#, Others
  • Learning:C, C++, Python, JavaScript, Transact-SQL, Assembly

Posted 17 April 2011 - 06:34 AM

how can i do that??? what's the syntax and what's with the access modifiers in inheritance
  • 0

#2 gregwarner

gregwarner

    Obi Wan of Programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1586 posts
  • Location:Arkansas
  • Programming Language:C, Java, C++, C#, PHP, Transact-SQL

Posted 18 April 2011 - 09:01 AM

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)
  • 0

ti-99-sig.png
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

    Helping the world with programming

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1249 posts
  • Location:Zagreb
  • Programming Language:C#, Others
  • Learning:C, C++, Python, JavaScript, Transact-SQL, Assembly

Posted 18 April 2011 - 10:20 AM

tnx man it's helping ;)
  • 0





Also tagged with one or more of these keywords: inheritance