Click here to Skip to main content
15,895,256 members
Home / Discussions / C#
   

C#

 
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 
Generalpassing this as read/write Pin
Ista22-Jul-03 5:29
Ista22-Jul-03 5:29 
GeneralDont look at me funny for asking this Pin
RB@Emphasys22-Jul-03 4:32
RB@Emphasys22-Jul-03 4:32 
GeneralRe: Dont look at me funny for asking this Pin
Ista22-Jul-03 9:23
Ista22-Jul-03 9:23 
Generalremoting.config question Pin
LongRange.Shooter22-Jul-03 4:11
LongRange.Shooter22-Jul-03 4:11 
Generalprobs with print: Generic/Text only :confused: Pin
troels_sorensen22-Jul-03 4:09
troels_sorensen22-Jul-03 4:09 
GeneralRe: probs with print: Generic/Text only :confused: Pin
troels_sorensen22-Jul-03 23:52
troels_sorensen22-Jul-03 23:52 

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.