Click here to Skip to main content
15,902,299 members
Home / Discussions / C#
   

C#

 
GeneralRe: How this below code works Pin
DaveyM6911-Jan-10 14:11
professionalDaveyM6911-Jan-10 14:11 
GeneralRe: How this below code works Pin
indian14311-Jan-10 14:27
indian14311-Jan-10 14:27 
QuestionBoolean value changes without being modified, don't know why. Pin
aespielberg11-Jan-10 10:14
aespielberg11-Jan-10 10:14 
AnswerRe: Boolean value changes without being modified, don't know why. Pin
Luc Pattyn11-Jan-10 10:56
sitebuilderLuc Pattyn11-Jan-10 10:56 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
aespielberg11-Jan-10 11:08
aespielberg11-Jan-10 11:08 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
Luc Pattyn11-Jan-10 11:24
sitebuilderLuc Pattyn11-Jan-10 11:24 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
aespielberg11-Jan-10 11:41
aespielberg11-Jan-10 11:41 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
Luc Pattyn11-Jan-10 12:06
sitebuilderLuc Pattyn11-Jan-10 12:06 
1.
aespielberg wrote:
I normally do go step by step, but with this error (which seems so bizarre), other than the delegates, I really didn't know what to check...


It isn't a good idea to grow a program while it has known bugs, especially bugs you don't understand.
Rationale:
- old bugs make adding/testing new features more difficult;
- the eventual fix may force you to reconsider the architecture, the algorithm, the data structures, well almost everything; so when you continue to build on a bad initial choice, you either will get stuck with it, or have much more work fixing the mistake later. Fixing early puts you on the better track early on.

2.

aespielberg wrote:
so I guess delegates use threading after all


Not really.
Threads execute code; each app starts with one thread, which executes Main().
apps can create additional threads, and tell them what method to execute.
threads do not magically come into existence, you create them, or you hook up to some asynchronous event: timers firing, a serial port reporting some data got available, etc.

delegates are what used to be function pointers, so executing them really executes the method they refer to, and that happens in the current context, i.e. by the current thread.
delegates don't create or otherwise cause new threads.

3.
I would like to see:
- the class declaration itself (the line holding "class" up to the next "{")
- the declaration of "area" and "currAreaValid"

4.
I would like to understand:
- what is size (inside Fold)? is it changing? can I see the declaration?
- what is tuple.First?

5.
You are aware it is good practice to have property getters always invariant, i.e. you calling them more than once must be guaranteed to always return the same result; if that is not the case, you should provide a method, not a property. There is no technical reason for this, it is a convention, and it really helps.
Example: Console.ReadLine() is a method as it returns the next line, a different one each time; don't use a property for this.

Smile | :)

Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

Happy New Year to all.
We hope 2010 soon brings us automatic PRE tags!
Until then, please insert them manually.


GeneralRe: Boolean value changes without being modified, don't know why. Pin
aespielberg11-Jan-10 12:23
aespielberg11-Jan-10 12:23 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
Luc Pattyn11-Jan-10 13:08
sitebuilderLuc Pattyn11-Jan-10 13:08 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
aespielberg11-Jan-10 13:24
aespielberg11-Jan-10 13:24 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
aespielberg11-Jan-10 13:34
aespielberg11-Jan-10 13:34 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
Luc Pattyn11-Jan-10 13:50
sitebuilderLuc Pattyn11-Jan-10 13:50 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
Daniel Grunwald12-Jan-10 6:20
Daniel Grunwald12-Jan-10 6:20 
QuestionHow do I set the "Apply onto" option in NTFS file security rights using c#? Pin
arnold_w11-Jan-10 9:12
arnold_w11-Jan-10 9:12 
AnswerRe: How do I set the "Apply onto" option in NTFS file security rights using c#? [modified] Pin
arnold_w12-Jan-10 2:52
arnold_w12-Jan-10 2:52 
GeneralRe: How do I set the "Apply onto" option in NTFS file security rights using c#? Pin
batrado_®8-Feb-10 1:42
batrado_®8-Feb-10 1:42 
QuestionSend video capture over LAN Pin
shutupsquare11-Jan-10 8:58
shutupsquare11-Jan-10 8:58 
AnswerRe: Send video capture over LAN Pin
Alex Manolescu11-Jan-10 9:49
Alex Manolescu11-Jan-10 9:49 
QuestionFinding * characters in a string Pin
sleepyman11-Jan-10 8:52
sleepyman11-Jan-10 8:52 
AnswerRe: Finding * characters in a string Pin
Alex Manolescu11-Jan-10 9:31
Alex Manolescu11-Jan-10 9:31 
GeneralRe: Finding * characters in a string Pin
PIEBALDconsult11-Jan-10 14:54
mvePIEBALDconsult11-Jan-10 14:54 
AnswerRe: Finding * characters in a string Pin
Luc Pattyn11-Jan-10 9:48
sitebuilderLuc Pattyn11-Jan-10 9:48 
GeneralRe: Finding * characters in a string Pin
sleepyman12-Jan-10 8:11
sleepyman12-Jan-10 8:11 
AnswerRe: Finding * characters in a string Pin
PIEBALDconsult11-Jan-10 14:52
mvePIEBALDconsult11-Jan-10 14:52 

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.