Hey all. New to developing. I used to be a webos user and always found precentral as the best forum for info and help so hopefully its the same here.
I've found that learning to develop for windows phone is much easier thanks to the assistance of visuals (visual studio) It's not so much that it makes it too simple, but rather being able to see what your designing and then see the design code, makes it much quicker to learn. and i've been enjoying it over webos. Ive watched several videos, got my hands very dirty with messing with code and am learning.
anyway i've learned that not all questions are easily answerable my main question is regards to global variables.
right now i have the same codes repeated several times because the calculations i am using are based of user settings. problems is because many of the calculations have if functions i have to paste the exact same variables in each instance, and i am concernet that may affect performance?
variables are fairly simple an example is
if (radio.IsChecked == true)
{
decimal a = decimal.parse(textBox1.Text)
decimal b = decimal.parse(textBox1.Text) / a
}
if (radio2.IsChecked == true)
{
decimal a = decimal.parse(textBox1.Text)
decimal b = decimal.parse(textBox1.Text) * a
}
i need the above to be available throughout atleast the page.
I've found that learning to develop for windows phone is much easier thanks to the assistance of visuals (visual studio) It's not so much that it makes it too simple, but rather being able to see what your designing and then see the design code, makes it much quicker to learn. and i've been enjoying it over webos. Ive watched several videos, got my hands very dirty with messing with code and am learning.
anyway i've learned that not all questions are easily answerable my main question is regards to global variables.
right now i have the same codes repeated several times because the calculations i am using are based of user settings. problems is because many of the calculations have if functions i have to paste the exact same variables in each instance, and i am concernet that may affect performance?
variables are fairly simple an example is
if (radio.IsChecked == true)
{
decimal a = decimal.parse(textBox1.Text)
decimal b = decimal.parse(textBox1.Text) / a
}
if (radio2.IsChecked == true)
{
decimal a = decimal.parse(textBox1.Text)
decimal b = decimal.parse(textBox1.Text) * a
}
i need the above to be available throughout atleast the page.