我在类图中的依赖项有问题。我使用这些类
类数据和类算法
类之间有什么关系? 谢谢您的帮助
数据.cs =>
public class Data {
public string Data1 { get; set; }
public string Data2 { get; set; }
public Data(string data1, string data2)
{
this.Data1 = data1;
this.Data2 = data2;
}
public string data1data2()
{
return Data1 + " " + Data2;
}
}
算法.cs =>
public static class Algorithm
{
public static void MethodData()
{
List<Data> data = new List<data>();
data.Add(new Data("aaaa", "bbb"));
.
.
foreach(Data item in data)
{
Console.WriteLine(item.data1data2());
}
.
}
}