02-26-05 07:50 AM
When I try calling this method from an orchestration I get a
missingmethodexception error
this is how i call it:
mathVar.WriteToFile("hello");
Thanks in advance
public int WriteToFile(string sText)
{
try
{
//Pass the filepath and filename to the StreamWriter Constructor
StreamWriter sw = new StreamWriter("C:\\Test.txt");
//Write a line of text
sw.WriteLine(sText);
//Write a second line of text
sw.WriteLine("From the StreamWriter class");
//Close the file
sw.Close();
return 0;
}
catch(Exception e)
{
return 1;
}
finally
{
//Console.WriteLine("Executing finally block.");
}
}
[ Post a follow-up to this message ]
|