Click here to Skip to main content
15,891,372 members
Home / Discussions / C#
   

C#

 
Questiondynamically changing assembly Pin
For_IT25-Sep-06 18:20
For_IT25-Sep-06 18:20 
AnswerRe: dynamically changing assembly Pin
Rob Philpott26-Sep-06 0:33
Rob Philpott26-Sep-06 0:33 
Questiongetting a count of a delimiter in a string Pin
Keshav V. Kamat25-Sep-06 17:27
Keshav V. Kamat25-Sep-06 17:27 
AnswerRe: getting a count of a delimiter in a string Pin
Niiiissssshhhhhuuuuu25-Sep-06 17:48
Niiiissssshhhhhuuuuu25-Sep-06 17:48 
GeneralRe: getting a count of a delimiter in a string Pin
Keshav V. Kamat25-Sep-06 18:21
Keshav V. Kamat25-Sep-06 18:21 
AnswerRe: getting a count of a delimiter in a string Pin
Guffa25-Sep-06 18:41
Guffa25-Sep-06 18:41 
JokeRe: getting a count of a delimiter in a string Pin
lmoelleb25-Sep-06 21:10
lmoelleb25-Sep-06 21:10 
GeneralRe: getting a count of a delimiter in a string Pin
LongRange.Shooter26-Sep-06 8:00
LongRange.Shooter26-Sep-06 8:00 
OMG -- this is the worst example of programming I've seen since I taught class.


Keshav V. Kamat wrote:
i did this because I wanted to store the substrings in a separate array.


Your code does no storing of anything in any array whatsoever! And it is quite an expensive set of code. Doing this:
string Val = "a,b,c,ddd,e"
string values[] = Val.Split(',');


...will take your input string, split out the values into an array, remove the comma, and it's length represents the number of comma-delimited words in it. You end up with an array that looks like this:

a
b
c
ddd
e

and the number of values is values.Length which is 5 -- and the number of commas is values.Length - 1 which is 4. Likewise if there are no ',' in the string, then values contains just the first instance of the string with an array length of 1.
Questiona autoscroll question Pin
cchere25-Sep-06 15:20
cchere25-Sep-06 15:20 
QuestionShortcutBar with TabCtrl functionality? Pin
kozu25-Sep-06 15:18
kozu25-Sep-06 15:18 
QuestionProblem with dataGridView_SelectionChanged event in vs2005 . Pin
hdv21225-Sep-06 12:06
hdv21225-Sep-06 12:06 
QuestionDataGrid Pin
btota25-Sep-06 10:33
btota25-Sep-06 10:33 
AnswerRe: DataGrid Pin
Nader Elshehabi25-Sep-06 11:02
Nader Elshehabi25-Sep-06 11:02 
QuestionSystem.Diagnostics.Process Pin
DR Delphi25-Sep-06 10:22
DR Delphi25-Sep-06 10:22 
AnswerRe: System.Diagnostics.Process Pin
Nader Elshehabi25-Sep-06 10:49
Nader Elshehabi25-Sep-06 10:49 
GeneralRe: System.Diagnostics.Process [modified] Pin
Niiiissssshhhhhuuuuu25-Sep-06 17:35
Niiiissssshhhhhuuuuu25-Sep-06 17:35 
QuestionChange RowColor in datagridview Pin
ezazazel25-Sep-06 8:43
ezazazel25-Sep-06 8:43 
AnswerRe: Change RowColor in datagridview Pin
Nader Elshehabi25-Sep-06 10:46
Nader Elshehabi25-Sep-06 10:46 
AnswerRe: Change RowColor in datagridview Pin
naldur26-Sep-06 21:46
naldur26-Sep-06 21:46 
QuestionCORBA and VS2005 Pin
ezazazel25-Sep-06 8:23
ezazazel25-Sep-06 8:23 
AnswerRe: CORBA and VS2005 Pin
led mike25-Sep-06 8:37
led mike25-Sep-06 8:37 
GeneralRe: CORBA and VS2005 Pin
ezazazel25-Sep-06 8:44
ezazazel25-Sep-06 8:44 
GeneralRe: CORBA and VS2005 Pin
led mike25-Sep-06 9:07
led mike25-Sep-06 9:07 
GeneralRe: CORBA and VS2005 Pin
ezazazel25-Sep-06 9:14
ezazazel25-Sep-06 9:14 
GeneralRe: CORBA and VS2005 Pin
led mike25-Sep-06 11:21
led mike25-Sep-06 11:21 

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.