I defined a struct
like this
public enum LineType
{
Red,//angle<th,L>th
Green,//L<th
Blue,//angle>th,L>th
none
}
public struct LineData
{
public double angle;
public double length;
public LineType lineType;
public int number;
}
In another class called DataTableTools
, I defined a function
class DataTableTools
{
public enum LineType
{
Red,//angle<th,L>th
Green,//L<th
Blue,//angle>th,L>th
none
}
public struct LineData
{
public double angle;
public double length;
public LineType lineType;
public int number;
}
public bool InsertData(LineData lineData)
{
...
return true;
}
}
However, when I called function
in main dialog:
DataTableTools dtTools=new DataTableTools();
bool b=dtTools.InsertData(lineData);
An error occurred: Argument type '...MainDialog.LineData' is not assignable to parameter type 'DataTableTools.LineData'.
I really confused about it. Why LineData type was different in different class?
Thanks for help.