C# class file -
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace Mech_Editor
{
class InternalStructure
{
public decimal[,] endoSteel = new decimal[,]
{
{20m, 1},
{25m, 1.5m},
{30m, 1.5m},
{35m, 2.0m},
{40m, 2.0m},
{45m, 2.5m},
{50m, 2.5m},
{55m, 3.0m},
{60m, 3.0m},
{65m, 3.5m},
{70m, 3.5m},
{75m, 4.0m},
{80m,4.0m},
{85m,4.5m},
{90m,4.5m},
{95m,5.0m},
{100m,5.0m}
};
public decimal standardInternalStucture(decimal tonnage)
{
return tonnage * .10M;
}
public decimal endoSteelInternalStructure(decimal tonnage)
{
decimal result = 0;
for (int counter = 0; counter <= endoSteel.Length; counter++)
{
if (endoSteel[counter, 0] == tonnage)
{
result = endoSteel[counter, 1];
break;
}
}
return result;
}
public List<string> InternalStructureTypes()
{
StreamReader structure = new StreamReader(System.Windows.Forms.Application.StartupPath + @"\internalStructureTypes.txt");
List<string> skeleton = new List<string>();
while (!structure.EndOfStream)
{
skeleton.Add(structure.ReadLine());
}
structure.Close();
return skeleton;
}
}
}
For VB I know they use Imports instead of Using... So I assume at the very least I need "Imports System.IO". What about the other imports/usings?

New Topic/Question
Reply


MultiQuote







|