Hello everyone,
I want to pass list items to one class to anther class. I have used static keyword. But now, when the application is running still old variable is there.
This is my 1st class,
- foreach (DocumentsUser item in listView1.SelectedItems)
- {
- ImgName.Add(item.Parent_File_Name);
- UserId.Add((int)item.UserId);
- }
- private static readonly List<string> imgName = new List<string>();
- public static List<string> ImgName { get { return imgName; } }
- private static readonly List<int> userId = new List<int>();
- public static List<int> UserId { get { return userId; } }
- foreach (var userId in Qscan.UC_FileMgmt.UserId)
- {
- foreach (var imgName in Qscan.UC_FileMgmt.ImgName)
- {

Amit GuptaPosted Dec 26, 2016, 7:53 AM
Abhilash J APosted Dec 26, 2016, 8:39 AM
Abhilash J APosted Dec 26, 2016, 4:35 AM
Amit GuptaPosted Dec 25, 2016, 11:25 AM
Abhilash J APosted Dec 25, 2016, 7:46 AM
Amit GuptaPosted Dec 25, 2016, 5:44 AM
Abhilash J APosted Dec 25, 2016, 3:50 AM
Amit GuptaPosted Dec 25, 2016, 3:39 AM