Click here to Skip to main content
15,913,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: lock needed in this scenario? Pin
George_George26-May-08 15:39
George_George26-May-08 15:39 
Questiondoing validation in other file.cs Pin
angels77725-May-08 1:58
angels77725-May-08 1:58 
AnswerRe: doing validation in other file.cs Pin
Christian Graus25-May-08 2:03
protectorChristian Graus25-May-08 2:03 
GeneralRe: doing validation in other file.cs Pin
angels77725-May-08 2:10
angels77725-May-08 2:10 
GeneralRe: doing validation in other file.cs Pin
#realJSOP25-May-08 2:14
professional#realJSOP25-May-08 2:14 
Questionwhich website define proje from beginer to advance?, pliz help me Pin
mbaz25-May-08 1:56
mbaz25-May-08 1:56 
AnswerRe: which website define proje from beginer to advance?, pliz help me Pin
Christian Graus25-May-08 2:06
protectorChristian Graus25-May-08 2:06 
QuestionLine changment in streamWriter and sensitive replace method Pin
Casper Hansen25-May-08 1:53
Casper Hansen25-May-08 1:53 
Hello.

I have 2 questions for you

Question 1:
I got this method:

private void writeData()
        {
            StreamWriter writer = new StreamWriter(saveMonsterSetBase.FileName, false);

            for (int i = 0; i < MonsterSetBaseDataArray.Count; i++)
            {
                writer.Write(MonsterSetBaseDataArray[i]);
            }

            writer.Close();
        }


Which sort of works

It writes data from my arraylist to a file

The problem is it writes it in one line.

If my arraylist is like this:
line 1
line 2
line 3

It writes in the file like this:
line 1 line 2 line 3

How can I make a line changment?


Question 2:
I have a string that looks like this:
string testString = "1 10";

and I want to replace 1 and 10 with something

I replace it like this:
testString.Replace("1", "One").Replace("10", "Ten");

But the problem is that the output for 10 comes out as OneTen

Is there any way to replace 1 as just One and 10 as just Ten?
AnswerRe: Line changment in streamWriter and sensitive replace method Pin
Casper Hansen25-May-08 2:33
Casper Hansen25-May-08 2:33 
QuestionIFIlter: how can I read name of value-type property? Pin
Prazwol24-May-08 22:55
Prazwol24-May-08 22:55 
QuestionVisual Studio Setup and Deployment projects Pin
danielk_24-May-08 19:22
danielk_24-May-08 19:22 
AnswerRe: Visual Studio Setup and Deployment projects Pin
Dario Solera25-May-08 0:36
Dario Solera25-May-08 0:36 
QuestionActive Directory and C# Pin
Imtiaz Murtaza24-May-08 12:59
Imtiaz Murtaza24-May-08 12:59 
AnswerRe: Active Directory and C# Pin
teejayem24-May-08 13:39
teejayem24-May-08 13:39 
AnswerRe: Active Directory and C# Pin
Anthony Mushrow24-May-08 14:14
professionalAnthony Mushrow24-May-08 14:14 
AnswerRe: Active Directory and C# Pin
mav.northwind25-May-08 21:26
mav.northwind25-May-08 21:26 
QuestionPattern for GUI invocations from worker threads Pin
Jörgen Sigvardsson24-May-08 12:23
Jörgen Sigvardsson24-May-08 12:23 
AnswerRe: Pattern for GUI invocations from worker threads Pin
Jörgen Sigvardsson24-May-08 13:46
Jörgen Sigvardsson24-May-08 13:46 
GeneralRe: Pattern for GUI invocations from worker threads Pin
Dario Solera25-May-08 0:02
Dario Solera25-May-08 0:02 
GeneralRe: Pattern for GUI invocations from worker threads Pin
Jörgen Sigvardsson25-May-08 0:30
Jörgen Sigvardsson25-May-08 0:30 
GeneralRe: Pattern for GUI invocations from worker threads Pin
Dario Solera25-May-08 0:33
Dario Solera25-May-08 0:33 
Questionwindows service - not allowing shut down Pin
tai-fun24-May-08 12:06
tai-fun24-May-08 12:06 
AnswerRe: windows service - not allowing shut down Pin
Dario Solera25-May-08 0:38
Dario Solera25-May-08 0:38 
QuestionIs it possible to place my C# form beneath the desktop icons? Pin
buypymoncdnx24-May-08 10:51
buypymoncdnx24-May-08 10:51 
AnswerRe: Is it possible to place my C# form beneath the desktop icons? Pin
Ed.Poore24-May-08 12:01
Ed.Poore24-May-08 12:01 

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.