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

C#

 
Questionbubble and quick method Pin
sapnju_fejinja25-Nov-06 7:33
sapnju_fejinja25-Nov-06 7:33 
QuestionRe: bubble and quick method Pin
CPallini25-Nov-06 8:50
mveCPallini25-Nov-06 8:50 
AnswerRe: bubble and quick method Pin
sapnju_fejinja25-Nov-06 9:47
sapnju_fejinja25-Nov-06 9:47 
GeneralRe: bubble and quick method Pin
Rob Graham25-Nov-06 10:38
Rob Graham25-Nov-06 10:38 
GeneralRe: bubble and quick method Pin
Paul Conrad25-Nov-06 11:28
professionalPaul Conrad25-Nov-06 11:28 
GeneralRe: bubble and quick method Pin
CPallini25-Nov-06 10:41
mveCPallini25-Nov-06 10:41 
QuestionPoint Of Sale Project Pin
Waskira25-Nov-06 7:06
Waskira25-Nov-06 7:06 
QuestionOut-of-memory Exception Pin
yonidebest25-Nov-06 5:57
yonidebest25-Nov-06 5:57 
Hi,

I get the above exception while using my code and I really do not know why. The code creates a jagged string array which includes two arrays. Each array holds 20 string items. (In the following code I removed some of it as to not overload this page...).

I then use a for statement (it made en exception using foreach as well), inwhich I create a new Regex variable and use it to replace text. The code is:

string[][] newInfo = new string[2][];
newInfo[0] = new string[20] {"string 1", "string 2", "string 3", ... }; // 20 of them
newInfo[1] = new string[20] {"string 1", "string 2", "string 3", ... }; // 20 of them
for (int i = 0; i < newInfo[0].Length; i++) {
    string parameter = newInfo[0][i];
    string value = newInfo[1][Array.IndexOf(newInfo[0], parameter)];
    if (value != "-")
    {
       Regex rxParameter = new Regex("\x7C" + parameter + "=" + ".*" + "\x7C"); // \x7C is a pipe (|)
       p.text = rxParameter.Replace(p.text, "\x7C" + parameter + "=" + value + "\x7C");
    }
}


After compiling and running this, the program get stuck at i=3, at the replace function. I dont know why the program is out of memory. Does anyone know what I should do?

Thanks,
Yoni
AnswerRe: Out-of-memory Exception Pin
S. Senthil Kumar25-Nov-06 6:32
S. Senthil Kumar25-Nov-06 6:32 
QuestionRe: Out-of-memory Exception Pin
yonidebest25-Nov-06 9:07
yonidebest25-Nov-06 9:07 
AnswerRe: Out-of-memory Exception Pin
Argus225-Nov-06 12:52
Argus225-Nov-06 12:52 
GeneralRe: Out-of-memory Exception Pin
yonidebest26-Nov-06 10:43
yonidebest26-Nov-06 10:43 
AnswerRe: Out-of-memory Exception Pin
S. Senthil Kumar25-Nov-06 18:10
S. Senthil Kumar25-Nov-06 18:10 
GeneralRe: Out-of-memory Exception Pin
yonidebest26-Nov-06 10:43
yonidebest26-Nov-06 10:43 
QuestionRe: Out-of-memory Exception Pin
CPallini25-Nov-06 8:37
mveCPallini25-Nov-06 8:37 
AnswerRe: Out-of-memory Exception Pin
yonidebest25-Nov-06 9:11
yonidebest25-Nov-06 9:11 
AnswerRe: Out-of-memory Exception Pin
Luc Pattyn25-Nov-06 10:08
sitebuilderLuc Pattyn25-Nov-06 10:08 
QuestionRe: Out-of-memory Exception Pin
yonidebest25-Nov-06 12:47
yonidebest25-Nov-06 12:47 
AnswerRe: Out-of-memory Exception Pin
Luc Pattyn25-Nov-06 15:09
sitebuilderLuc Pattyn25-Nov-06 15:09 
GeneralRe: Out-of-memory Exception Pin
yonidebest26-Nov-06 10:39
yonidebest26-Nov-06 10:39 
QuestionProtecting "A Assembly"? Pin
Ariston Darmayuda25-Nov-06 5:19
Ariston Darmayuda25-Nov-06 5:19 
AnswerRe: Protecting "A Assembly"? Pin
Paul Conrad25-Nov-06 6:20
professionalPaul Conrad25-Nov-06 6:20 
GeneralRe: Protecting "A Assembly"? Pin
Ariston Darmayuda26-Nov-06 3:01
Ariston Darmayuda26-Nov-06 3:01 
GeneralRe: Protecting "A Assembly"? Pin
Amar Chaudhary26-Nov-06 14:07
Amar Chaudhary26-Nov-06 14:07 
AnswerRe: Protecting "A Assembly"? Pin
Scott Dorman27-Nov-06 4:58
professionalScott Dorman27-Nov-06 4:58 

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.