dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online MembersJivani
Phagu Mahato
krishnagoluguri@gmail.com
Matt M
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Forums » .NET » .NET »

Multiline textbox


Posted Date: 28 Nov 2009      Posted By:: Sumiya     Member Level: Bronze    Member Rank: 0     Points: 1   Responses: 2



I have a string that contains many lines.
It is something like:
Name Address Place City

I need to read this string line by line, that is to assign line 1 of the string to a certain variable, line 2 to another, and so on.

Do you know how that can be done?




Responses

#448053    Author: Alwyn Duraisingh        Member Level: Gold      Member Rank: 11     Date: 28/Nov/2009   Rating: 2 out of 52 out of 5     Points: 2


string a = "ur string"
string[] b = a.Split(new string[] { Environment.NewLine},

string Name = b[0];
string Address = b[1];
.
.
.
string n = b[n];


Regards,
Alwyn Duraisingh.M 
<< Database Administrator >>
Jesus saves! The rest of us better make backups...



 
#448059    Author: krunal k shah      Member Level: Silver      Member Rank: 0     Date: 28/Nov/2009   Rating: 2 out of 52 out of 5     Points: 2

Dim i As Integer
Dim b As String()
b = TextBox1.Text.Split(Environment.NewLine)
For i = 0 To b.GetUpperBound(0) - 1
MsgBox(b(i))
Next

where every enter in input is consider as new field



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : With out creating instance how to pass values in C#.net
Previous : Deployment of VB.Net Application
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.