c# how to change a variable value with one from a text file

Updated on February 22, 2018 in [A] Other Answers
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
1 on February 11, 2018

Hi, how can i read from a text file that have the name of variables and the value for each of them and update my current variables value to the ones that are in the file. 

For example:

In C# I have  int weight= 70;

                     int height=180;

In .txt file i have weight= 80

                         height=190

and so on a list of 15 variables…

How can i change the value of the weight from c# with one from .txt ?

 

 

 

  • Liked by
Reply