c# - variable was wrong in debug mode using .netframework 3.5 -


i have problem code when step debug (vs2017 .net framework 3.5 ,debug mode) here code

  class program {        static void main(string[] args) {         dataparameter para = new dataparameter("12");       }     }     enum testenum {         a,         b,         c     }     class dataparameter {         private bool c33;         public dataparameter(string name) {             testenum ta = testenum.a;             c33 = ta == testenum.a || ta == testenum.b;//after execute :c33 = false             name = name;//after execute :c33 = true         }         public string name { get; set; }     } 

step 1 step 2

when add breakpoint stops before executing code. when stops on line 24, assignment c33 has not been done , c33 has default value of bool member, false. after executing line 24 set true expected.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -