Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
Questionthe Registry and DOS commands Pin
Antonio JVS14-Dec-09 2:40
Antonio JVS14-Dec-09 2:40 
AnswerRe: the Registry and DOS commands Pin
Md. Marufuzzaman14-Dec-09 3:01
professionalMd. Marufuzzaman14-Dec-09 3:01 
GeneralRe: the Registry and DOS commands Pin
Antonio JVS14-Dec-09 3:47
Antonio JVS14-Dec-09 3:47 
AnswerRe: the Registry and DOS commands Pin
S. Brozius14-Dec-09 3:18
S. Brozius14-Dec-09 3:18 
AnswerRe: the Registry and DOS commands [modified] Pin
EliottA14-Dec-09 3:28
EliottA14-Dec-09 3:28 
GeneralRe: the Registry and DOS commands Pin
Antonio JVS14-Dec-09 3:54
Antonio JVS14-Dec-09 3:54 
GeneralRe: the Registry and DOS commands Pin
EliottA14-Dec-09 4:08
EliottA14-Dec-09 4:08 
QuestionHow to read a file from any kind of documents and display its contents? Pin
CoderForEver14-Dec-09 2:00
CoderForEver14-Dec-09 2:00 
Hi my friends ........ I want to do term weighting by an approach called Composite measure(Tf*idf) ... it has its own formula ....
But what I want to do is to read files like(Word 2003,2007 pdf files etc.... ) then to take each word as an array .... I can read all files line by line by the following code
<br />
try<br />
                {<br />
                    // Create an instance of StreamReader to read from a file.<br />
                    // The using statement also closes the StreamReader.<br />
                    using (StreamReader sr = new StreamReader(textBox1.Text,Encoding.ASCII,true))// Where textbox1.text is a path<br />
                    {<br />
                        String line;<br />
                        // Read and display lines from the file until the end of <br />
                        // the file is reached.<br />
                        while ((line = sr.ReadLine()) != null)<br />
                        {<br />
                         richTextBox1.Text =richTextBox1.Text +Environment.NewLine+ line;<br />
<br />
                            //MessageBox.Show(line);<br />
                        }<br />
                    }<br />
                }<br />


and to check the content of the file i tried to display it on a Richtextbox1 .... but it displays encrypted file .....
What I want to know is
1. How can I put each words(separated by Space and newline) in to array ... just to know each word (here displaying the content is not necessary)
2. How can I display the content of each file on Richtextbox1 ... but not in an encrypted form ....

Thanks for your help
AnswerRe: How to read a file from any kind of documents and display its contents? PinPopular
OriginalGriff14-Dec-09 2:06
mveOriginalGriff14-Dec-09 2:06 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
CoderForEver14-Dec-09 2:42
CoderForEver14-Dec-09 2:42 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
#realJSOP14-Dec-09 2:51
mve#realJSOP14-Dec-09 2:51 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
CoderForEver14-Dec-09 2:59
CoderForEver14-Dec-09 2:59 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
#realJSOP14-Dec-09 3:01
mve#realJSOP14-Dec-09 3:01 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
Eddy Vluggen14-Dec-09 3:03
professionalEddy Vluggen14-Dec-09 3:03 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
#realJSOP14-Dec-09 4:27
mve#realJSOP14-Dec-09 4:27 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
Eddy Vluggen14-Dec-09 5:37
professionalEddy Vluggen14-Dec-09 5:37 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
#realJSOP14-Dec-09 6:28
mve#realJSOP14-Dec-09 6:28 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
OriginalGriff14-Dec-09 4:11
mveOriginalGriff14-Dec-09 4:11 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
OriginalGriff14-Dec-09 4:22
mveOriginalGriff14-Dec-09 4:22 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
CoderForEver14-Dec-09 2:45
CoderForEver14-Dec-09 2:45 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
EliottA14-Dec-09 3:23
EliottA14-Dec-09 3:23 
AnswerRe: How to read a file from any kind of documents and display its contents? Pin
Eddy Vluggen14-Dec-09 3:10
professionalEddy Vluggen14-Dec-09 3:10 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
CoderForEver14-Dec-09 4:18
CoderForEver14-Dec-09 4:18 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
Maximilien14-Dec-09 4:51
Maximilien14-Dec-09 4:51 
GeneralRe: How to read a file from any kind of documents and display its contents? Pin
Eddy Vluggen14-Dec-09 5:32
professionalEddy Vluggen14-Dec-09 5:32 

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.