Scope of DataSeries - defining inside switch statements and referencing them outside?
Author: kbellare
Creation Date: 6/18/2013 1:31 PM
profile picture

kbellare

#1
I'm defining 2 data series (amaUp and amaDown) inside Switch statements and using them outside. Code below .. It gives me the following compilation errors
- error CS0136: A local variable named 'amaUp' cannot be declared in this scope because it would give a different meaning to amaUp which is already used ..
- error CS0128: A local variable named 'amaUp' is already defined in this scope.

-> How do i define data series inside Switch statements and reference them outside?

CODE:
Please log in to see this code.
profile picture

Eugene

#2
CODE:
Please log in to see this code.
profile picture

Eugene

#3
On second thought, no need in switch() here altogether. Let's simplify things:

CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).