Click here to Skip to main content
15,915,093 members
Home / Discussions / C#
   

C#

 
AnswerRe: Determining valid moves for a chess game [modified] PinPopular
Luc Pattyn28-Jul-08 4:00
sitebuilderLuc Pattyn28-Jul-08 4:00 
AnswerRe: Determining valid moves for a chess game Pin
GuyThiebaut28-Jul-08 5:11
professionalGuyThiebaut28-Jul-08 5:11 
GeneralRe: Determining valid moves for a chess game Pin
Luc Pattyn28-Jul-08 5:25
sitebuilderLuc Pattyn28-Jul-08 5:25 
GeneralRe: Determining valid moves for a chess game Pin
GuyThiebaut28-Jul-08 5:43
professionalGuyThiebaut28-Jul-08 5:43 
QuestionType comparison syntax Pin
Mycroft Holmes28-Jul-08 2:58
professionalMycroft Holmes28-Jul-08 2:58 
AnswerRe: Type comparison syntax Pin
Gareth H28-Jul-08 3:03
Gareth H28-Jul-08 3:03 
GeneralRe: Type comparison syntax Pin
Mycroft Holmes28-Jul-08 4:13
professionalMycroft Holmes28-Jul-08 4:13 
QuestionScrapping a Datastore Pin
logicon28-Jul-08 2:54
logicon28-Jul-08 2:54 
AnswerRe: Scrapping a Datastore Pin
logicon28-Jul-08 3:26
logicon28-Jul-08 3:26 
Questionold value after validating event of datetimepicker Pin
tabstop28-Jul-08 2:25
tabstop28-Jul-08 2:25 
AnswerRe: old value after validating event of datetimepicker Pin
Kjetil Svendsen28-Jul-08 5:30
Kjetil Svendsen28-Jul-08 5:30 
GeneralRe: old value after validating event of datetimepicker Pin
tabstop28-Jul-08 20:49
tabstop28-Jul-08 20:49 
Questionupdate xml file Pin
arkiboys28-Jul-08 2:14
arkiboys28-Jul-08 2:14 
AnswerRe: update xml file Pin
teejayem28-Jul-08 2:39
teejayem28-Jul-08 2:39 
QuestionDeploying multiple projects Pin
jamesjk28-Jul-08 1:04
jamesjk28-Jul-08 1:04 
AnswerRe: Deploying multiple projects Pin
Thomas Stockwell28-Jul-08 1:33
professionalThomas Stockwell28-Jul-08 1:33 
GeneralRe: Deploying multiple projects Pin
jamesjk28-Jul-08 1:54
jamesjk28-Jul-08 1:54 
GeneralRe: Deploying multiple projects Pin
Thomas Stockwell28-Jul-08 2:03
professionalThomas Stockwell28-Jul-08 2:03 
QuestionopenFileDialog win form Pin
arkiboys28-Jul-08 0:59
arkiboys28-Jul-08 0:59 
Hello,
The following code shows how to use the openFileDialog to read the contents of a .csv file into a textbox.

Question:
After selecting the file iin the dialog, how do I actually open the file?
remember that I would like to open the .csv file and NOT read it into the textbox.

StreamReader ts = null;

openFileDialog1.CheckFileExists = true;
openFileDialog1.CheckPathExists = true;
openFileDialog1.DefaultExt = "csv";

openFileDialog1.Filter = "Text files (*.csv)|*.csv|" + "All files|*.*";
openFileDialog1.Multiselect = false;
openFileDialog1.FilterIndex = 2;
openFileDialog1.ValidateNames = true;

if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
ts = new StreamReader(openFileDialog1.OpenFile());

txtSQL.Text = ts.ReadToEnd();
}
}

Thanks
AnswerRe: openFileDialog win form Pin
stancrm28-Jul-08 1:05
stancrm28-Jul-08 1:05 
GeneralRe: openFileDialog win form Pin
arkiboys28-Jul-08 1:17
arkiboys28-Jul-08 1:17 
GeneralRe: openFileDialog win form Pin
sumit703428-Jul-08 1:33
sumit703428-Jul-08 1:33 
GeneralRe: openFileDialog win form Pin
arkiboys28-Jul-08 1:58
arkiboys28-Jul-08 1:58 
GeneralRe: openFileDialog win form Pin
sumit703428-Jul-08 2:20
sumit703428-Jul-08 2:20 
GeneralRe: openFileDialog win form Pin
Thomas Stockwell28-Jul-08 1:35
professionalThomas Stockwell28-Jul-08 1:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.