Sign in to follow this  
Brownie

Huge Noob Question about C#

Recommended Posts

Brownie    122
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
Washu    7829
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this