Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
GeneralRe: StringBuilder chars with index Pin
misterbear22-Jul-03 11:23
misterbear22-Jul-03 11:23 
GeneralSHIFT + CTRL Pin
kanch eramudu22-Jul-03 7:46
kanch eramudu22-Jul-03 7:46 
GeneralRe: SHIFT + CTRL Pin
James T. Johnson22-Jul-03 8:17
James T. Johnson22-Jul-03 8:17 
GeneralRe: SHIFT + CTRL Pin
J. Dunlap22-Jul-03 8:54
J. Dunlap22-Jul-03 8:54 
GeneralRe: SHIFT + CTRL Pin
kanch eramudu23-Jul-03 6:18
kanch eramudu23-Jul-03 6:18 
GeneralDataGrid Column Alignment Pin
albean22-Jul-03 7:26
albean22-Jul-03 7:26 
GeneralRe: DataGrid Column Alignment Pin
A.Wegierski23-Jul-03 3:35
A.Wegierski23-Jul-03 3:35 
GeneralPosition of Characters in a String Pin
.gonad22-Jul-03 6:51
.gonad22-Jul-03 6:51 
Hi How can i find the position of each of the spaces in this string?

String duh = "Its a beautiful day in the neighborhood";<br />
int c = 0;<br />
char[] s = duh.ToCharArray();<br />
for(int i = 0; i < s.Length; i++)<br />
{<br />
	if(s[i].ToString() == " ")<br />
	{<br />
		c++;<br />
		Console.WriteLine(c);<br />
	}<br />
}


This code finds the 6 spaces in the string, but i'm having a hard time getting the IndexOf location of each of these spaces.

Any help would be appreciated.
GeneralRe: Position of Characters in a String Pin
Julian Bucknall [MSFT]22-Jul-03 7:08
Julian Bucknall [MSFT]22-Jul-03 7:08 
GeneralRe: Position of Characters in a String Pin
David Stone22-Jul-03 7:16
sitebuilderDavid Stone22-Jul-03 7:16 
GeneralRe: Position of Characters in a String Pin
.gonad22-Jul-03 9:04
.gonad22-Jul-03 9:04 
GeneralRe: Position of Characters in a String Pin
Julian Bucknall [MSFT]22-Jul-03 11:37
Julian Bucknall [MSFT]22-Jul-03 11:37 
GeneralRe: Position of Characters in a String Pin
Frank Olorin Rizzi22-Jul-03 7:14
Frank Olorin Rizzi22-Jul-03 7:14 
GeneralRe: Position of Characters in a String Pin
Bo Hunter22-Jul-03 15:58
Bo Hunter22-Jul-03 15:58 
GeneralWindows.Forms, Linux and C# Pin
User 665822-Jul-03 5:47
User 665822-Jul-03 5:47 
GeneralRe: Windows.Forms, Linux and C# Pin
Rein Hillmann22-Jul-03 6:19
Rein Hillmann22-Jul-03 6:19 
GeneralRe: Windows.Forms, Linux and C# Pin
Alex Korchemniy22-Jul-03 7:17
Alex Korchemniy22-Jul-03 7:17 
GeneralRe: Windows.Forms, Linux and C# Pin
Daniel Turini22-Jul-03 7:17
Daniel Turini22-Jul-03 7:17 
GeneralRe: Windows.Forms, Linux and C# Pin
User 665823-Jul-03 1:16
User 665823-Jul-03 1:16 
QuestionIs there a clean way to remove a control and it's associated event handlers? Pin
work_to_live22-Jul-03 5:36
work_to_live22-Jul-03 5:36 
AnswerRe: Is there a clean way to remove a control and it's associated event handlers? Pin
Frank Olorin Rizzi22-Jul-03 7:17
Frank Olorin Rizzi22-Jul-03 7:17 
GeneralRe: Is there a clean way to remove a control and it's associated event handlers? Pin
work_to_live22-Jul-03 9:27
work_to_live22-Jul-03 9:27 
AnswerRe: Is there a clean way to remove a control and it's associated event handlers? Pin
James T. Johnson22-Jul-03 8:13
James T. Johnson22-Jul-03 8:13 
GeneralRe: Is there a clean way to remove a control and it's associated event handlers? Pin
work_to_live22-Jul-03 9:29
work_to_live22-Jul-03 9:29 
AnswerRe: Is there a clean way to remove a control and it's associated event handlers? Pin
Ista22-Jul-03 9:22
Ista22-Jul-03 9:22 

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.