3.0/LINQ Constructors-VBForums
Results 1 to 3 of 3

Thread: Constructors

Hybrid View

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2008
    Posts
    59

    Constructors

    Stupid question I am sure but I have no idea how to do it.

    Lets say I have a window (wpf) called wndWindow.

    Code:
    wndWindow tWindow = new wndWindow();
    Now I'd like to create a constructor for wndWindow which will accept an argument. Essentially, I want to be able to do something like:

    Code:
    wndWindow tWindow = new wndWindow(options.thisoption);
    Previously I've just used numbers and I just remembered which number corresponds to what but I'm reusing this window heaps and keep forgetting the numbers as there are about 12 of them.

    So I'd type option. and then intellisense will show the list of options. These options might be Option1, Option2, Option3, Optiona, Optionb.

    It's hard to google for something when I don't actually know what this is called, lol.

  2. #2
    PowerPoster
    Join Date
    May 2002
    Posts
    25,155

    Re: Constructors

    It's an Enum... here... http://msdn.microsoft.com/en-us/libr...(v=vs.80).aspx

    Enjoy!

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2008
    Posts
    59

    Re: Constructors

    Thanks, got it all going how I wanted it now

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.