Posted on 2008-11-07
Last Modified: 2012-05-05
If I pass a value to a form like this.  Does it use the property ?

  private int myVal;
        public int MyVal{ get { return myVal; } set { myVal= value; } }
 public Frm1(int myVal)
          //Do something with myVal

Passing the value like this.....
Frm1 frm1 = new Frm1(AnotherValue);

Or should I use
frm1.MyValue = AnotherValue;
Question by:u2envy1
    1 Comment
    LVL 22

    Accepted Solution

    to use the property you would use thhe frm1.MyValue -- the other way is using the constructor of the form

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now