I'm sure this is something simple. I'm not very familiar with C# (I'm actually porting this over from C++).
I am calling the method CalculateLines which is in the class CalculateFrontages after an 'OK' click (snippet):
private void Button_Click(object sender, RoutedEventArgs e)
{
// MessageBox.Show("User clicked OK");
string value = MSTGapThresholdInMeters.Text;
MSTGapValue = Int32.Parse(value);
MainWindowViewModel.RedTLS = CalculateFrontages.CalculateLines(MainWindowViewModel.RedArmy, Map.MetersPerPixel, MSTGapValue);
MainWindowViewModel.BlueTLS = CalculateFrontages.CalculateLines(MainWindowViewModel.BlueArmy, Map.MetersPerPixel, MSTGapValue);
this.DialogResult = true;
}
And this is the method, CalculateLines, which is in another class, CalculateFrontages, that I want to call (snippet):
namespace TacticalAILib
{
public class CalculateFrontages
{
static int[] U;
private static TacLineStruct CalculateLines(List<MATEUnit> Army, double MetersPerPixel, int MSTGapValue)
{
int TempFrom, TempTo;
float TempWeight;
int NumEdges = 0;
double Threshold = MetersPerPixel * MSTGapValue;
U = new int[Army.Count];
And it's throwing this compiler error:
Error CS0426 The type name 'CalculateLines' does not exist in the type 'CalculateFrontages'
I assume it's a scope error, or a declaration error. I just don't know enough about this.