Home How to access variables from other objects in C#?
Reply: 0

How to access variables from other objects in C#?

user515
1#
user515 Published in May 24, 2018, 4:00 pm

As you can see, I have a number of variables setup. However, I wish to multiply the 'lengthInchConverted' and 'widthInchConverted' and output them to a textbox called 'totalAreaCM'.

I have set the methods as public, however, I cannot access the variable from the top method. How should I go about fixing this?

In the second screenshot I commented out the line of code to better illustrate my point. The 'Calculate' button will be for something else in the future.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.358013 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO