|
-
Apr 17th, 2006, 05:24 PM
#1
Thread Starter
Hyperactive Member
constructor
I read that every class can have a constructor (or multiple constructors ).
I have a form1 class and this is the start up form.
I want to try and see how the constructor for his object works, and I added the following code.
public class Form1 : System.Windows.Forms.Form
{
public void Form1()
{
Console.WriteLine("Constructor");
}
}
static void Main()
{
Application.Run(new Form1());
}
Error: Member names cannot be same as the member types
what does that mean?
nath
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|