Log in

View Full Version : Resolved c# .NET - constructor



NDK
11-30-2009, 09:54 AM
Hi,

I have 2 classes: class Person and class Address

Is it possible to make a constructor in Person like something like this:

public Person(String firstname, String lastname, int age, address(String nCity, String nStreet, int nNumber, int nZipCode))

In my address class, i have a constructor like this:

address(String nCity, String nStreet, int nNumber, int nZipCode)

so i can do this in de main:

person1 = new Person("Bob","Grant","30",Address("LA","parc avenue", 22, 1234))

NDK
11-30-2009, 10:16 AM
i can't find the delete button to delete this post, but it's ok. I found the solution...