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 GuptaRank #190 · 12.8K reputationPosted Dec 26, 2016, 2:53 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Dec 24, 2016, 10:39 PM EST
Amit GuptaRank #190 · 12.8K reputationPosted Dec 25, 2016, 12:44 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Dec 25, 2016, 6:25 AM EST
Abhilash J ARank #1,243 · 1.4K reputationPosted Dec 24, 2016, 10:50 PM EST
Abhilash J ARank #1,243 · 1.4K reputationPosted Dec 25, 2016, 2:46 AM EST
Abhilash J ARank #1,243 · 1.4K reputationPosted Dec 25, 2016, 11:35 PM EST
Abhilash J ARank #1,243 · 1.4K reputationPosted Dec 26, 2016, 3:39 AM EST