Click here to Skip to main content
15,891,529 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Creating Bitmap from MemoryStream Pin
xry20063-Mar-10 1:39
xry20063-Mar-10 1:39 
GeneralRe: Creating Bitmap from MemoryStream Pin
The Man from U.N.C.L.E.3-Mar-10 3:02
The Man from U.N.C.L.E.3-Mar-10 3:02 
QuestionTimer reset Pin
Bob Beaubien26-Feb-10 11:57
Bob Beaubien26-Feb-10 11:57 
Answerclue Pin
Luc Pattyn26-Feb-10 12:23
sitebuilderLuc Pattyn26-Feb-10 12:23 
GeneralRe: clue Pin
Bob Beaubien26-Feb-10 12:34
Bob Beaubien26-Feb-10 12:34 
GeneralRe: clue Pin
Bob Beaubien26-Feb-10 12:40
Bob Beaubien26-Feb-10 12:40 
GeneralRe: clue Pin
Luc Pattyn26-Feb-10 13:13
sitebuilderLuc Pattyn26-Feb-10 13:13 
QuestionCode problem or exceeded array limits? Pin
Hurricane300026-Feb-10 5:15
Hurricane300026-Feb-10 5:15 
Hi all,

I have a little problem with a pair of arrays, when them are involved in a comparation work:

In particular, I have an Array A As String and another array B As String.
Normally the program works with a single array A, but sometimes I need a second array B.

Array A is filled with numerical string (sometime with up 15000 elements).
Array B is filled with numerical string (sometime with up 15000 elements).

The code works in this way:

Each element of array B is compared with Each element of array A.
If a value of array B is = to some value in array A then the value in the array B is removed and the array is resized (progressively size-decreased) but preserving remaining different values (Redim Preserve).

In this way, at the end of comparation loop, the array B will contain only values that are not already contained in array A.

The code seems to be perfectly working until the number of elements in array A and B is down about 2200 + 2200 elements, but if numbers of arrays element go up, the program seems to work (in an infinite loop) but in reality it is quited (closed) from O.S.
In the fact the program name disappears from list of running program.

The following is the schematic code:

Do Until IndexB = ArrayB.GetLength(0)
For IndexA = 1 to ArrayA.GetLength(0)
If Val(ArrayB(IndexB)) = Val(ArrayA(IndexA)) Then
ArrayB(IndexB) =  ArrayB(ArrayB.GetLength(0) - 1)
ReDim Preserve ArrayB((ArrayB.GetLength(0) - 1) - 1)
IndexB = IndexB - 1
Exit For
End If
Next
IndexB = IndexB + 1
Loop

Application is running in a Windows Mobile 6.1 Device.

Apparentely seems to be a memory problem, but I don't think so, because size of arrays is not exagerate and the device have enough available memory.

Thanks for help.
AnswerRe: Code problem or exceeded array limits? Pin
Luc Pattyn26-Feb-10 7:09
sitebuilderLuc Pattyn26-Feb-10 7:09 
AnswerRe: Code problem or exceeded array limits? Pin
Gideon Engelberth26-Feb-10 7:56
Gideon Engelberth26-Feb-10 7:56 
GeneralRe: Code problem or exceeded array limits? Pin
Hurricane300026-Feb-10 9:39
Hurricane300026-Feb-10 9:39 
QuestionExit on Keyboard button Pin
Bob Beaubien25-Feb-10 15:54
Bob Beaubien25-Feb-10 15:54 
AnswerRe: Exit on Keyboard button Pin
Dr.Walt Fair, PE25-Feb-10 17:00
professionalDr.Walt Fair, PE25-Feb-10 17:00 
GeneralRe: Exit on Keyboard button Pin
Bob Beaubien25-Feb-10 17:17
Bob Beaubien25-Feb-10 17:17 
QuestionShortcut Keys [solved] Pin
Mehdi Ghiasi24-Feb-10 23:20
Mehdi Ghiasi24-Feb-10 23:20 
AnswerRe: Shortcut Keys Pin
Nuri Ismail24-Feb-10 23:31
Nuri Ismail24-Feb-10 23:31 
GeneralRe: Shortcut Keys Pin
Mehdi Ghiasi24-Feb-10 23:44
Mehdi Ghiasi24-Feb-10 23:44 
GeneralRe: Shortcut Keys Pin
Nuri Ismail24-Feb-10 23:46
Nuri Ismail24-Feb-10 23:46 
QuestionHow can I programatically select video source using WebCam_Capture.dll PinPopular
M Wyatt24-Feb-10 13:53
M Wyatt24-Feb-10 13:53 
AnswerRe: How can I programatically select video source using WebCam_Capture.dll Pin
cybertronick4-Feb-11 1:20
cybertronick4-Feb-11 1:20 
Question.Net equivalent to ADODB? [Solved] Pin
Gregory Gadow24-Feb-10 6:08
Gregory Gadow24-Feb-10 6:08 
AnswerRe: .Net equivalent to ADODB? Pin
Pete O'Hanlon24-Feb-10 6:44
mvePete O'Hanlon24-Feb-10 6:44 
GeneralRe: .Net equivalent to ADODB? Pin
Gregory Gadow24-Feb-10 10:18
Gregory Gadow24-Feb-10 10:18 
GeneralRe: .Net equivalent to ADODB? Pin
Pete O'Hanlon24-Feb-10 10:43
mvePete O'Hanlon24-Feb-10 10:43 
GeneralNote to self: read inner exception messages Pin
Gregory Gadow24-Feb-10 12:09
Gregory Gadow24-Feb-10 12:09 

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.