using System.Collections.Generic;
string Address { get; set; }
string Value { get; set; }
bool Status { get; set; }
public string Address { get; set; }
public string Value { get; set; }
public bool Status { get; set; }
public Tag(string address, string val, bool status)
public static void Main()
Console.WriteLine("Hello World");
public class PLCInterface2
public static List<ITag> PLCTagList = new List<ITag>();
public static List<ITag> setPLCTagValues(List<ITag> tagList)
List<ITag> returnList = new List<ITag>();
foreach (ITag addTag in tagList)
if (!(PLCTagList.Exists(tag => tag.Address == addTag.Address)))
foreach (ITag UITag in tagList)
foreach (ITag PLCTag in PLCTagList)
if (UITag.Address == PLCTag.Address)
PLCTag.Value = UITag.Value;
foreach (ITag PLCTag in PLCTagList)
if (PLCTag.Value == null)
public static List<ITag> getPLCTagValues(List<Tag> tagList)
List<ITag> returnList = new List<ITag>();
foreach (ITag addTag in tagList)
if (!(PLCTagList.Exists(PLCTag => PLCTag.Address == addTag.Address)))
foreach (ITag PLCTag in PLCTagList)
if (PLCTag.Value == null)
foreach (ITag UITag in tagList)
foreach (ITag PLCTag in PLCTagList)
if (UITag.Address == PLCTag.Address)