Results 1 to 2 of 2

Thread: c# .NET - constructor

  1. #1
    Join Date
    Feb 2009
    Posts
    23
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default c# .NET - constructor

    Hi,

    I have 2 classes: class Person and class Address

    Is it possible to make a constructor in Person like something like this:
    Code:
    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:
    Code:
    address(String nCity, String nStreet, int nNumber, int nZipCode)

    so i can do this in de main:
    Code:
    person1 = new Person("Bob","Grant","30",Address("LA","parc avenue", 22, 1234))

  2. #2
    Join Date
    Feb 2009
    Posts
    23
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    i can't find the delete button to delete this post, but it's ok. I found the solution...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •