Solved

loading richTextBox lines into a string array

Posted on 2004-09-21
4
316 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
ID: 12116966
yourArray= richTextBox.Lines;
0
 
LVL 5

Expert Comment

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

Expert Comment

by:123654789987
ID: 12120928
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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Diagnostics with Net and Net.Sockets 2 33
Hey!!!! 1 29
C# class library debugging - Breakpoint will not hit. 8 21
Upgrade code from VS 2010 to VS 2015 7 17
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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

829 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