Click here to Skip to main content
15,889,211 members
Home / Discussions / C#
   

C#

 
GeneralRe: Storing references in a class [modified] Pin
Martin#11-Apr-07 3:11
Martin#11-Apr-07 3:11 
AnswerRe: Storing references in a class Pin
Scott Dorman10-Apr-07 17:48
professionalScott Dorman10-Apr-07 17:48 
GeneralRe: Storing references in a class Pin
Ephoy11-Apr-07 0:11
Ephoy11-Apr-07 0:11 
GeneralRe: Storing references in a class Pin
Scott Dorman12-Apr-07 2:53
professionalScott Dorman12-Apr-07 2:53 
Questionconvert grayscale array to Image Pin
aei_totten10-Apr-07 7:17
aei_totten10-Apr-07 7:17 
QuestionMDI application childform maximize Pin
sinosoidal10-Apr-07 6:33
sinosoidal10-Apr-07 6:33 
AnswerRe: MDI application childform maximize Pin
il_masacratore11-Apr-07 21:29
il_masacratore11-Apr-07 21:29 
QuestionString Manipulation Question Pin
JMOdom10-Apr-07 6:20
JMOdom10-Apr-07 6:20 
I am new to C# programming and I would like to ask for opinions on some coding procedures. Smile | :)

I have a user input sentence that goes into “strValue”, (See below) from there it gets cut into separate words.

I then need to add the first letter and “ay” to the end of the word. (So that it forms a pig Latin style word.)Then I need to restring them back into the same order that they were originally. I think I'm putting them into an array, and if so there is going to be no problem getting them back. Blush | :O

What I would like to know is “Would I be better off to place the string manipulations into separate constructors, methods, or maybe lumping them all together in either one”. Unsure | :~

I know that each person does it differently, but I would like some feedback on what may be a better way to do this. Cool | :cool: Rose | [Rose] Thank you.

private string strValue = " ";<br />
private string s = " ";<br />
<br />
//Cuts string into seperate words (char ?)<br />
char[] separator = { ' ' };<br />
string[] s;<br />
s = strValue.Split(separator);<br />
foreach (string word in s)<br />
{<br />
Console.Write("{0}" + " ", word);<br />
}<br />
<br />
<br />
            s = strValue.Insert(); <br />
            //add first letter to end of word<br />
<br />
            s = strValue.Insert(); <br />
           //add "ay" to end of word<br />
<br />
            s = strValue.Remove(0, 1); <br />
            //Remove first letter

AnswerRe: String Manipulation Question Pin
Are Jay10-Apr-07 8:47
Are Jay10-Apr-07 8:47 
QuestionC# accessing Excel Pin
shamidi10-Apr-07 5:55
shamidi10-Apr-07 5:55 
AnswerRe: C# accessing Excel Pin
led mike10-Apr-07 7:39
led mike10-Apr-07 7:39 
QuestionFileWatcher Pin
LCI10-Apr-07 5:32
LCI10-Apr-07 5:32 
AnswerRe: FileWatcher Pin
vineas10-Apr-07 5:48
vineas10-Apr-07 5:48 
QuestionUser Control - comments for public properties in form designer Pin
peterchen10-Apr-07 5:13
peterchen10-Apr-07 5:13 
AnswerRe: User Control - comments for public properties in form designer Pin
Martin#10-Apr-07 5:40
Martin#10-Apr-07 5:40 
QuestionListview and remove or disallow duplicates Pin
Saamir10-Apr-07 5:07
Saamir10-Apr-07 5:07 
AnswerRe: Listview and remove or disallow duplicates Pin
Saamir10-Apr-07 6:51
Saamir10-Apr-07 6:51 
QuestionReference type or not Pin
hamidkhan10-Apr-07 4:38
hamidkhan10-Apr-07 4:38 
AnswerRe: Reference type or not Pin
Guffa10-Apr-07 7:08
Guffa10-Apr-07 7:08 
QuestionRe: Reference type or not Pin
hamidkhan10-Apr-07 7:28
hamidkhan10-Apr-07 7:28 
AnswerRe: Reference type or not Pin
Guffa10-Apr-07 8:16
Guffa10-Apr-07 8:16 
QuestionCombobox value Pin
msogun10-Apr-07 4:26
msogun10-Apr-07 4:26 
AnswerRe: Combobox value Pin
mark_w_10-Apr-07 5:39
mark_w_10-Apr-07 5:39 
QuestionDataGridView validation Pin
7110-Apr-07 3:56
7110-Apr-07 3:56 
AnswerRe: DataGridView validation Pin
Sathesh Sakthivel10-Apr-07 4:17
Sathesh Sakthivel10-Apr-07 4:17 

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.