Hello im a new member to this forum so if this is in the wrong place im very sorry.
any way i have been developing a piece of software that reads from a .txt file soo far i have got it working but only on my pc eg "c:\documents and settings\........" so on and so forth i was wondering if anyone knew how to make the application be able to read form the file on any computer i tried
String fileLocation = ConsoleApplication1.StartupPath + "textFile.txt";
but this dident seem to work (just to let you know i am quite new to programming) the code i have at the moment that works is
StreamReader objReader = new StreamReader("C:\\Documents and Settings\\Owner\\Desktop\\Ascii reader\\Enter Your Ascii Picture here.txt");
string sLine = "";
ArrayList arrText = new ArrayList();
while (sLine != null)
{
sLine = objReader.ReadLine();
if (sLine != null)
arrText.Add(sLine);
}
objReader.Close();
foreach (string sOutput in arrText)
Console.WriteLine(sOutput);
Console.WriteLine();
Console.WriteLine("Thank You For Useing DaN BrOwN'S Ascii Reader");
Console.ReadLine();
i was wondering if there was any way of adapting the above code to make it so it could find that file after an install on any computer if that makes sence :confused:
well thanks very much kind regards zixizx.