Click here to Skip to main content
15,893,161 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simple C# array of classes question? (C# vs C++ ) Pin
Guffa10-Apr-08 16:39
Guffa10-Apr-08 16:39 
GeneralRe: Simple C# array of classes question? (C# vs C++ ) Pin
#realJSOP11-Apr-08 4:41
mve#realJSOP11-Apr-08 4:41 
GeneralRe: Simple C# array of classes question? (C# vs C++ ) Pin
Guffa11-Apr-08 11:13
Guffa11-Apr-08 11:13 
GeneralRe: Simple C# array of classes question? (C# vs C++ ) Pin
Pinhead_Me11-Apr-08 18:56
Pinhead_Me11-Apr-08 18:56 
GeneralRe: Simple C# array of classes question? (C# vs C++ ) Pin
Guffa12-Apr-08 14:15
Guffa12-Apr-08 14:15 
Generalinterpret address locations Pin
shwaguy10-Apr-08 10:25
shwaguy10-Apr-08 10:25 
GeneralRe: interpret address locations Pin
pmarfleet10-Apr-08 10:56
pmarfleet10-Apr-08 10:56 
GeneralRe: interpret address locations Pin
shwaguy28-Apr-08 4:44
shwaguy28-Apr-08 4:44 
GeneralSub Form Pin
rockNroll10-Apr-08 10:22
rockNroll10-Apr-08 10:22 
GeneralRe: Sub Form Pin
Luc Pattyn10-Apr-08 10:55
sitebuilderLuc Pattyn10-Apr-08 10:55 
GeneralDataGridView binding Pin
Shekelele10-Apr-08 9:54
Shekelele10-Apr-08 9:54 
GeneralRe: DataGridView binding Pin
sarilee10-Apr-08 21:09
sarilee10-Apr-08 21:09 
GeneralRe: DataGridView binding Pin
Shekelele11-Apr-08 4:24
Shekelele11-Apr-08 4:24 
QuestionVideo motion detection and cursor movement Pin
=Momi=10-Apr-08 9:52
=Momi=10-Apr-08 9:52 
GeneralRe: Video motion detection and cursor movement Pin
Christian Graus10-Apr-08 13:00
protectorChristian Graus10-Apr-08 13:00 
QuestionBitmap + Clipboard + Transparency = Blue Background? Pin
Chadwick Posey10-Apr-08 9:49
Chadwick Posey10-Apr-08 9:49 
AnswerRe: Bitmap + Clipboard + Transparency = Blue Background? Pin
Christian Graus10-Apr-08 13:03
protectorChristian Graus10-Apr-08 13:03 
GeneralVeryfy user and password agains a windows account Pin
Ola E10-Apr-08 9:11
Ola E10-Apr-08 9:11 
GeneralHelp with pseudo code / C# Pin
srmanuel10-Apr-08 8:19
srmanuel10-Apr-08 8:19 
I need help coding the following pseudo code into C#.

The 3 algorithms are search methods for a program which can look through a set of data to find the subsequence of values which add
up to the highest total value.

So for example with the data set.

10 -6 12 -17 9 8 -2

the algorithm(s) show that the "best" value was 17 from array index 4 to array index 5 if you go through it. (9 + 8)

10 - 6 = 4
10 - 6 + 12 = 16
10 - 6 + 12 - 17 = -1
10 - 6 + 12 - 17 + 9 = 8
10 - 6 + 12 - 17 + 9 + 8 = 16
10 - 6 + 12 - 17 + 9 + 8 - 2 = 14
-6 + 12 = 6
-6 +12 -17 = -11
-6 +12 -17 + 9 = -2
etc



For every possible start position // every array index
For every possible end position // rest of array from current start
{
Set subtotal to 0
For every value in subseq // between current start and end
Add profit value to subtotal
Update subseq info when subtotal exceeds current best total
}




For every possible start position...
Set subtotal to 0
For every possible end position...
{
Add end position’s profit value to subtotal
Update subseq if subtotal exceeds current best total
}





Set start position to 0, subtotal to 0
For every profit value... // index from 0 to end of array as end position
{
Add value to subtotal
Keep subseq info (start, end, total) if total exceeds current best
If total is less than 0,
set start position to next index and set total to 0
}

I need help creating C# versions of these methods which compile and run.

Thanks
GeneralRe: Help with pseudo code / C# Pin
Christian Graus10-Apr-08 13:06
protectorChristian Graus10-Apr-08 13:06 
GeneralRe: Help with pseudo code / C# Pin
Guffa10-Apr-08 16:49
Guffa10-Apr-08 16:49 
Generalcheckboxes in datagrids Pin
stephan_00710-Apr-08 7:44
stephan_00710-Apr-08 7:44 
GeneralRe: checkboxes in datagrids Pin
half-life10-Apr-08 8:07
half-life10-Apr-08 8:07 
Questionhow to get and use password of current windows user Pin
stephan_00710-Apr-08 7:36
stephan_00710-Apr-08 7:36 
AnswerRe: how to get and use password of current windows user Pin
nes2world10-Apr-08 8:30
nes2world10-Apr-08 8:30 

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.