Hello all, I am having some problems. I cannot recall how to use a variable from another method in the same class. I have a basic form at this point and I am trying to set up a progress bar. I have 3 classes the form.cs, otcFetch.cs, and progress.cs.
In otcFetch.cs I am using rest sharp to go out and download a csv file and it inserts it into a sqlLite database.Here it is taking the csv file and seperating it for insertion.
- string[] strSeparators = new string[] { "\r\n" };
- string[] Lines = response.Content.Split(strSeparators, StringSplitOptions.None);
- string[] Fields;
- //update console
- Console.WriteLine("Updating Database!");
- //set value from number of lines in csv
- int numLines = Lines.Length;
- public void otcRestClient() { }
- public class Variables
- {
- public static int taskSize = otcFetch.Variables.THE VARIABLE WILL NOT LIST HERE???;
- public static int totalSize
- {
- get { return taskSize; }
- set { taskSize = value; }
- }
- }
Sachin SinghPosted Nov 10, 2020, 2:25 AM
Amit GuptaPosted Nov 9, 2020, 10:46 PM