Local Variable Declaration Issue

后端 未结 4 1090
醉梦人生
醉梦人生 2021-01-21 09:26

Im getting the following error:

Cannot use local variable \'dob\' before it is declared

Here is my implementation

pu         


        
4条回答
  •  清酒与你
    2021-01-21 09:53

    You are redeclaring dob in

    string dob = origin.ToString("d"); 
    

    it should be

     dob = origin.ToString("d"); 
    

提交回复
热议问题