Now I'm trying to send this data from the main application to a DLL via a Pipe.
Convert Doubles to String
private static void ProcessData(int count)
{
string SingleLineTestData = "";
TestResults = "";
for (int I = 0; I < count ; I++)
{
SingleLineTestData = RawTestData[0, I].ToString() + ",";
SingleLineTestData += RawTestData[1, I].ToString() + ",";
SingleLineTestData += RawTestData[2, I].ToString() + ",";
SingleLineTestData += RawTestData[3, I].ToString();
TestResults += SingleLineTestData + ":";
}
}
Send String Via Pipe Out
private static StreamWriter PipeWriter;
public static bool PipeWrite(string PipeData)
{
bool ValidPipeOut = false;
if (PipeData!=null)
try
{
PipeWriter.AutoFlush = true;
PipeWriter.WriteLine(PipeData);
ValidPipeOut = true;
}
catch
{
ValidPipeOut = false;
}
return ValidPipeOut;
}
The Problem is I'm getting a large time Hit to covert 64,000 Doubles to a String so I can send them Via the Pipe.
Is there a more efferent way of either
1) Converting Doubles to a String
2) A way to Send a Double Array Via the Pipe without converting to a String.
The Reason I Add the ":" & the "," Is I can then Split the string via ":" for each line, and then each line can be split on the "," for each value.


Sign In
Create Account


Back to top









