Lost Password?

Go Back   CodeCall Programming Forum > Software Development > C# Programming

C# Programming C# (pronounced C-sharp) is a new object oriented language from Microsoft and is derived from C and C++. It also borrows a lot of concepts from Java too including garbage collection.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-17-2006, 05:48 PM
Chan Chan is offline
Programming Professional
 
Join Date: Jun 2006
Posts: 204
Rep Power: 9
Chan is on a distinguished road
Default Seperate values in a string

I have a string that has values seperated by commas. Is there a way in C# to get those values or has anyone made an easy function that will do this for me?

The string looks like this
value1,value2,value3,value4 and so on.

I'd like to have each value so that I can do other functions based on the value.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 07-17-2006, 06:25 PM
hoser2001's Avatar   
hoser2001 hoser2001 is offline
Programmer
 
Join Date: Jul 2006
Posts: 175
Rep Power: 9
hoser2001 is on a distinguished road
Default

Go to google and search for "CSV C#"

CSV stands for comma seperated values and yes there are numerous methods for dealing with them, I suggested the google search because I am unsure what you wish to do with these values...hopefully this helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-18-2006, 06:04 AM
brackett brackett is offline
Programmer
 
Join Date: May 2006
Posts: 193
Rep Power: 10
brackett is on a distinguished road
Default

System.String.Split is what you want.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-24-2006, 09:00 PM
Crane's Avatar   
Crane Crane is offline
Programming Expert
 
Join Date: Nov 2005
Posts: 399
Rep Power: 13
Crane is on a distinguished road
Default

split is easiest as long as their is a delimiter (space, comma, colon, etc.).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-25-2006, 09:17 AM
Chan Chan is offline
Programming Professional
 
Join Date: Jun 2006
Posts: 204
Rep Power: 9
Chan is on a distinguished road
Default

I was trying to write my own "split" function until I read this. It didn't work anyway. Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
need help in counting a specify character in a string. lichy Perl 2 06-27-2007 10:03 PM
[Help] String manipulation. afiser Visual Basic Programming 1 05-31-2007 03:24 PM
string problem Nille C and C++ 2 05-03-2007 07:25 AM
Is string in array? smith Perl 2 02-14-2007 01:30 PM
Sudoku can be solved using SQL..Take a look! roger Database & Database Programming 5 07-04-2006 02:20 PM


All times are GMT -5. The time now is 12:07 PM.

Contest Stats

John ........ 223.00000
dargueta ........ 168.00000
Xav ........ 164.00000
gaylo565 ........ 18.00000
WingedPanther ........ 15.00000
|pH| ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 66%

Ads