Sign in to follow this  

Huge Noob Question about C#

This topic is 3912 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok well I am starting to use Microsoft Visual C# and im following this tutorial http://blogs.msdn.com/coding4fun/archive/2006/11/02/938703.aspx at one point it says: * In the GameEngine class add the following code after the constructor. protected override void OnPaint(PaintEventArgs e) { } ok what I don't understand is what a constructor is can anyone help me? [Edited by - Brownie on May 3, 2007 7:19:00 PM]

Share this post


Link to post
Share on other sites
A constructor is a method within a type (we'll call the type T) that is called when an instance of that type (T) is created.

For some languages the constructor has the same name as the type that it is associated with. For instance, in your case the constructor would be called GameEngine.

It should be noted that these tutorials assume a basic understanding of the language, something you should obtain before attempting to use them.

Share this post


Link to post
Share on other sites
Sign in to follow this