Solved

loading richTextBox lines into a string array

Posted on 2004-09-21
4
312 Views
Last Modified: 2012-05-05
another newb question here:

I have a richTextBox that has values in it like say it has

C:\E000.log
C:\E002.log
C:\E0123.log


I want to load all those values into a string array... how could I do that please?

Thanks!
0
Comment
Question by:PoeticAudio
4 Comments
 
LVL 4

Accepted Solution

by:
NTAC earned 50 total points
Comment Utility
yourArray= richTextBox.Lines;
0
 
LVL 5

Expert Comment

by:tzxie2000
Comment Utility
string [] yourarray= richTextBox.Lines.Clone();
0
 
LVL 10

Expert Comment

by:123654789987
Comment Utility
U can try out this. It works , I had taken the input as
C:\E000.log
C:\E002.log
C:\E0123.log

                                               string delimStr = " ";
                  char [] delimiter = delimStr.ToCharArray();
                  string [] yourarray = null;
                  for(int i= 1;i<=3;i++)
                  {                        
                         yourarray= richTextBox1.Text.Split(delimiter,i);
                  }
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now