8
Answers

FileNotFoundException unhandled error

Photo of Anwar Jabbar

Anwar Jabbar

8y
227
1
Dear Friends,
 
Kindly assist on the below
I am making program in Visual Studio 2008 C# for Windows CE 6 device (datalogic memor).
Trying to read data from a CSV file using below code
 
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Windows.Forms;
 
 
private void cmdDataRefresh_Click(object sender, EventArgs e)
{
if (!File.Exists(@"d:\\SampleSale.csv"))
{
Console.WriteLine("{0} not exist.");
}
StreamReader reader = new StreamReader(File.OpenRead(@"SampleSale.csv"));
}
 
 
But i get an error while running the code at the line StreamReader 
 
 
 
 
Can you help on this? how to specify the file with path and why this error comes up?
 
Thanks
 
 
 
 

Answers (8)

0
Photo of Mykonine
NA 520 0 20y
I should probably make myself clearer: When you put your mouse over the icon a certain text is displayed. I want to programmatically force that same box with text to display without requiring the user to hover the mouse over the icon. Basically an alert.